* Re: [akpm-mm:mm-new 173/182] mm/khugepaged.c:113:25: error: variably modified 'mthp_bitmap' at file scope
2025-10-25 7:14 [akpm-mm:mm-new 173/182] mm/khugepaged.c:113:25: error: variably modified 'mthp_bitmap' at file scope kernel test robot
@ 2025-10-26 0:03 ` Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2025-10-26 0:03 UTC (permalink / raw)
To: kernel test robot; +Cc: Nico Pache, oe-kbuild-all, Linux Memory Management List
On Sat, 25 Oct 2025 15:14:10 +0800 kernel test robot <lkp@intel.com> wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-new
> head: 752c460b5865d87117095c915addcce7a68296f2
> commit: 8387af7962dd62a2a2cdb741e702b476da440ff0 [173/182] khugepaged: introduce mTHP collapse support
> config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20251025/202510251530.eJulmicR-lkp@intel.com/config)
Yes, this config is troublesome.
> compiler: powerpc64-linux-gcc (GCC) 15.1.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251025/202510251530.eJulmicR-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202510251530.eJulmicR-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> In file included from include/linux/kasan-checks.h:5,
> from include/asm-generic/rwonce.h:26,
> from ./arch/powerpc/include/generated/asm/rwonce.h:1,
> from include/linux/compiler.h:382,
> from include/asm-generic/bug.h:5,
> from arch/powerpc/include/asm/bug.h:116,
> from include/linux/bug.h:5,
> from include/linux/mmdebug.h:5,
> from include/linux/mm.h:6,
> from mm/khugepaged.c:4:
> >> mm/khugepaged.c:113:25: error: variably modified 'mthp_bitmap' at file scope
> 113 | DECLARE_BITMAP(mthp_bitmap, HPAGE_PMD_NR);
And "khugepaged: introduce collapse_max_ptes_none helper function"
causes this:
: In file included from <command-line>:
: In function 'collapse_max_ptes_none',
: inlined from '__collapse_huge_page_isolate' at mm/khugepaged.c:582:22:
: ././include/linux/compiler_types.h:597:45: error: call to '__compiletime_assert_784' declared with attribute error: min(khugepaged_max_ptes_none, (1<<((16 + __pte_index_size)-16))/2 - 1) signedness error
: 597 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
: | ^
: ././include/linux/compiler_types.h:578:25: note: in definition of macro '__compiletime_assert'
: 578 | prefix ## suffix(); \
: | ^~~~~~
: ././include/linux/compiler_types.h:597:9: note: in expansion of macro '_compiletime_assert'
: 597 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
: | ^~~~~~~~~~~~~~~~~~~
: ./include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
: 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
: | ^~~~~~~~~~~~~~~~~~
: ./include/linux/minmax.h:93:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
: 93 | BUILD_BUG_ON_MSG(!__types_ok(ux, uy), \
: | ^~~~~~~~~~~~~~~~
: ./include/linux/minmax.h:98:9: note: in expansion of macro '__careful_cmp_once'
: 98 | __careful_cmp_once(op, x, y, __UNIQUE_ID(x_), __UNIQUE_ID(y_))
: | ^~~~~~~~~~~~~~~~~~
: ./include/linux/minmax.h:105:25: note: in expansion of macro '__careful_cmp'
: 105 | #define min(x, y) __careful_cmp(min, x, y)
: | ^~~~~~~~~~~~~
: mm/khugepaged.c:489:25: note: in expansion of macro 'min'
: 489 | max_ptes_none = min(khugepaged_max_ptes_none, HPAGE_PMD_NR/2 - 1);
: | ^~~
I'll remove the v12 series from mm-new. Nico, TODOs for v13 please.
^ permalink raw reply [flat|nested] 2+ messages in thread