2024-02-05 08:22:11

by kernel test robot

[permalink] [raw]
Subject: include/linux/compiler_types.h:338:45: error: call to '__compiletime_assert_270' declared with attribute error: BUILD_BUG_ON failed: SECTIONS_WIDTH + NODES_WIDTH + ZONES_WIDTH + ilog2(roundup_pow_of_two(NR_CPUS)) > 32

Hi Will,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 54be6c6c5ae8e0d93a6c4641cb7528eb0b6ba478
commit: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move compiletime_assert() macros into compiler_types.h
date: 3 years, 7 months ago
config: sparc-randconfig-002-20240113 (https://download.01.org/0day-ci/archive/20240205/[email protected]/config)
compiler: sparc64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240205/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

arch/sparc/mm/init_64.c: In function 'sun4v_linear_pte_xor_finalize':
arch/sparc/mm/init_64.c:2210:23: warning: variable 'pagecv_flag' set but not used [-Wunused-but-set-variable]
2210 | unsigned long pagecv_flag;
| ^~~~~~~~~~~
In file included from <command-line>:
arch/sparc/mm/init_64.c: In function 'paging_init':
>> include/linux/compiler_types.h:338:45: error: call to '__compiletime_assert_270' declared with attribute error: BUILD_BUG_ON failed: SECTIONS_WIDTH + NODES_WIDTH + ZONES_WIDTH + ilog2(roundup_pow_of_two(NR_CPUS)) > 32
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:319:25: note: in definition of macro '__compiletime_assert'
319 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:338:9: note: in expansion of macro '_compiletime_assert'
338 | _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/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
arch/sparc/mm/init_64.c:2306:9: note: in expansion of macro 'BUILD_BUG_ON'
2306 | BUILD_BUG_ON(SECTIONS_WIDTH + NODES_WIDTH + ZONES_WIDTH +
| ^~~~~~~~~~~~

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for COMPAT_BINFMT_ELF
Depends on [n]: COMPAT [=y] && BINFMT_ELF [=n]
Selected by [y]:
- COMPAT [=y] && SPARC64 [=y]
WARNING: unmet direct dependencies detected for LOCKDEP
Depends on [n]: DEBUG_KERNEL [=y] && LOCK_DEBUGGING_SUPPORT [=y] && (FRAME_POINTER [=n] || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86)
Selected by [y]:
- LOCK_STAT [=y] && DEBUG_KERNEL [=y] && LOCK_DEBUGGING_SUPPORT [=y]
- DEBUG_LOCK_ALLOC [=y] && DEBUG_KERNEL [=y] && LOCK_DEBUGGING_SUPPORT [=y]


vim +/__compiletime_assert_270 +338 include/linux/compiler_types.h

324
325 #define _compiletime_assert(condition, msg, prefix, suffix) \
326 __compiletime_assert(condition, msg, prefix, suffix)
327
328 /**
329 * compiletime_assert - break build and emit msg if condition is false
330 * @condition: a compile-time constant condition to check
331 * @msg: a message to emit if condition is false
332 *
333 * In tradition of POSIX assert, this macro will break the build if the
334 * supplied condition is *false*, emitting the supplied error message if the
335 * compiler has support to do so.
336 */
337 #define compiletime_assert(condition, msg) \
> 338 _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
339

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki