include/linux/compiler.h:350:38: error: call to '__compiletime_assert_453' declared with attribute error: BUILD_BUG_ON failed: IS_ENABLED(CONFIG_32BIT) && (_PFN_SHIFT > PAGE_SHIFT)
Hi Paul, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 35e884f89df4c48566d745dc5a97a0d058d04263 commit: 05d013a0366d50f4f0dbebf8c1b22b42020bf49a MIPS: Detect bad _PFN_SHIFT values date: 10 months ago config: mips-randconfig-r001-20200705 (attached as .config) compiler: mipsel-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 05d013a0366d50f4f0dbebf8c1b22b42020bf49a # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): arch/mips/mm/init.c:62:6: warning: no previous prototype for 'setup_zero_pages' [-Wmissing-prototypes] 62 | void setup_zero_pages(void) | ^~~~ In file included from arch/mips/include/asm/bug.h:5, from include/linux/bug.h:5, from arch/mips/mm/init.c:11: arch/mips/mm/init.c: In function 'mem_init': >> include/linux/compiler.h:350:38: error: call to '__compiletime_assert_453' >> declared with attribute error: BUILD_BUG_ON failed: IS_ENABLED(CONFIG_32BIT) >> && (_PFN_SHIFT > PAGE_SHIFT) 350 | _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) | ^ include/linux/compiler.h:331:4: note: in definition of macro '__compiletime_assert' 331 |prefix ## suffix();\ |^~ include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert' 350 | _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) | ^~~ 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:2: note: in expansion of macro 'BUILD_BUG_ON_MSG' 50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition) | ^~~~ arch/mips/mm/init.c:453:2: note: in expansion of macro 'BUILD_BUG_ON' 453 | BUILD_BUG_ON(IS_ENABLED(CONFIG_32BIT) && (_PFN_SHIFT > PAGE_SHIFT)); | ^~~~ vim +/__compiletime_assert_453 +350 include/linux/compiler.h 9a8ab1c39970a4 Daniel Santos 2013-02-21 336 9a8ab1c39970a4 Daniel Santos 2013-02-21 337 #define _compiletime_assert(condition, msg, prefix, suffix) \ 9a8ab1c39970a4 Daniel Santos 2013-02-21 338__compiletime_assert(condition, msg, prefix, suffix) 9a8ab1c39970a4 Daniel Santos 2013-02-21 339 9a8ab1c39970a4 Daniel Santos 2013-02-21 340 /** 9a8ab1c39970a4 Daniel Santos 2013-02-21 341 * compiletime_assert - break build and emit msg if condition is false 9a8ab1c39970a4 Daniel Santos 2013-02-21 342 * @condition: a compile-time constant condition to check 9a8ab1c39970a4 Daniel Santos 2013-02-21 343 * @msg: a message to emit if condition is false 9a8ab1c39970a4 Daniel Santos 2013-02-21 344 * 9a8ab1c39970a4 Daniel Santos 2013-02-21 345 * In tradition of POSIX assert, this macro will break the build if the 9a8ab1c39970a4 Daniel Santos 2013-02-21 346 * supplied condition is *false*, emitting the supplied error message if the 9a8ab1c39970a4 Daniel Santos 2013-02-21 347 * compiler has support to do so. 9a8ab1c39970a4 Daniel Santos 2013-02-21 348 */ 9a8ab1c39970a4 Daniel Santos 2013-02-21 349 #define compiletime_assert(condition, msg) \ 9a8ab1c39970a4 Daniel Santos 2013-02-21 @350_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) 9a8ab1c39970a4 Daniel Santos 2013-02-21 351 :: The code at line 350 was first introduced by commit :: 9a8ab1c39970a4938a72d94e6fd13be88a797590 bug.h, compiler.h: introduce compiletime_assert & BUILD_BUG_ON_MSG :: TO: Daniel Santos :: CC: Linus Torvalds --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip
include/linux/compiler.h:350:38: error: call to '__compiletime_assert_453' declared with attribute error: BUILD_BUG_ON failed: IS_ENABLED(CONFIG_32BIT) && (_PFN_SHIFT > PAGE_SHIFT)
arning: no previous prototype for 'do_mdmx' [-Wmissing-prototypes] 1493 | asmlinkage void do_mdmx(struct pt_regs *regs) | ^~~ arch/mips/kernel/traps.c:1505:17: warning: no previous prototype for 'do_watch' [-Wmissing-prototypes] 1505 | asmlinkage void do_watch(struct pt_regs *regs) | ^~~~ arch/mips/kernel/traps.c:1532:17: warning: no previous prototype for 'do_mcheck' [-Wmissing-prototypes] 1532 | asmlinkage void do_mcheck(struct pt_regs *regs) | ^ arch/mips/kernel/traps.c: In function 'do_mcheck': arch/mips/kernel/traps.c:1535:17: warning: variable 'prev_state' set but not used [-Wunused-but-set-variable] 1535 | enum ctx_state prev_state; | ^~ arch/mips/kernel/traps.c: At top level: arch/mips/kernel/traps.c:1563:17: warning: no previous prototype for 'do_mt' [-Wmissing-prototypes] 1563 | asmlinkage void do_mt(struct pt_regs *regs) | ^ arch/mips/kernel/traps.c:1599:17: warning: no previous prototype for 'do_dsp' [-Wmissing-prototypes] 1599 | asmlinkage void do_dsp(struct pt_regs *regs) | ^~ arch/mips/kernel/traps.c:1607:17: warning: no previous prototype for 'do_reserved' [-Wmissing-prototypes] 1607 | asmlinkage void do_reserved(struct pt_regs *regs) | ^~~ arch/mips/kernel/traps.c:1783:17: warning: no previous prototype for 'cache_parity_error' [-Wmissing-prototypes] 1783 | asmlinkage void cache_parity_error(void) | ^~ arch/mips/kernel/traps.c:1831:17: warning: no previous prototype for 'do_ftlb' [-Wmissing-prototypes] 1831 | asmlinkage void do_ftlb(void) | ^~~ arch/mips/kernel/traps.c:1864:6: warning: no previous prototype for 'ejtag_exception_handler' [-Wmissing-prototypes] 1864 | void ejtag_exception_handler(struct pt_regs *regs) | ^~~ arch/mips/kernel/traps.c:1909:17: warning: no previous prototype for 'nmi_exception_handler' [-Wmissing-prototypes] 1909 | void __noreturn nmi_exception_handler(struct pt_regs *regs) | ^ In file included from arch/mips/include/asm/bug.h:5, from include/linux/bug.h:5, from arch/mips/mm/init.c:11: arch/mips/mm/init.c: In function 'mem_init': >> include/linux/compiler.h:350:38: error: call to '__compiletime_assert_453' >> declared with attribute error: BUILD_BUG_ON failed: IS_ENABLED(CONFIG_32BIT) >> && (_PFN_SHIFT > PAGE_SHIFT) 350 | _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) | ^ include/linux/compiler.h:331:4: note: in definition of macro '__compiletime_assert' 331 |prefix ## suffix();\ |^~ include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert' 350 | _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) | ^~~ 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:2: note: in expansion of macro 'BUILD_BUG_ON_MSG' 50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition) | ^~~~ arch/mips/mm/init.c:453:2: note: in expansion of macro 'BUILD_BUG_ON' 453 | BUILD_BUG_ON(IS_ENABLED(CONFIG_32BIT) && (_PFN_SHIFT > PAGE_SHIFT)); | ^~~~ make[3]: *** [scripts/Makefile.build:273: arch/mips/mm/init.o] Error 1 arch/mips/kernel/spram.c:194:6: warning: no previous prototype for 'spram_config' [-Wmissing-prototypes] 194 | void spram_config(void) | ^~~~ arch/mips/kernel/machine_kexec.c:136:1: warning: no previous prototype for 'machine_shutdown' [-Wmissing-prototypes] 136 | machine_shutdown(void) | ^~~~ arch/mips/kernel/machine_kexec.c:152:1: warning: no previous prototype for 'machine_crash_shutdown' [-Wmissing-prototypes] 152 | machine_crash_shutdown(struct pt_regs *regs) | ^~ arch/mips/kernel/module.c:290: warning: Function parameter or member 'reloc_handler' not described in 'int' arch/mips/kernel/module.c:290: warning: Excess function parameter 'me' description in 'int' arch/mips/kernel/module.c:290: warning: Excess function parameter 'location' description in 'int' arch/mips/kernel/module.c:290: warning: Excess function parameter 'base' description in 'int' arch/mips/kernel/module.c:290: warning: Excess function parameter 'v' description in 'int' make[2]: *** [scripts/Make