arch/x86/include/asm/pgtable_32.h:68:5: warning: "PTRS_PER_PMD" is not defined, evaluates to 0
kernel test robot
build bot::::::
:::::: Manual check reason: "only scripts/Makefile.* file changed" ::::::
BCC: [email protected]
CC: [email protected]
CC: [email protected]
TO: Masahiro Yamada <[email protected]>
CC: Nathan Chancellor <[email protected]>
CC: Nick Desaulniers <[email protected]>
Hi Masahiro,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 2d8308bf5b67dff50262d8a9260a50113b3628c6 commit: 80b6093b55e31c2c40ff082fb32523d4e852954f kbuild: add -Wundef to KBUILD_CPPFLAGS for W=1 builds date: 2 years ago
:::::: branch date: 16 hours ago
:::::: commit date: 2 years ago
config: i386-allnoconfig (https://download.01.org/0day-ci/archive/20241215/[email protected]/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241215/[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/r/[email protected]/
All warnings (new ones prefixed by >>):
In file included from arch/x86/kernel/head_32.S:29:
>> arch/x86/include/asm/pgtable_32.h:68:5: warning: "PTRS_PER_PMD" is not defined, evaluates to 0 [-Wundef]
68 | #if PTRS_PER_PMD > 1
| ^~~~~~~~~~~~vim +/PTRS_PER_PMD +68 arch/x86/include/asm/pgtable_32.h
^1da177e4c3f415 include/asm-i386/pgtable.h Linus Torvalds 2005-04-16 58 1e620f9b23e598a arch/x86/include/asm/pgtable_32.h Boris Ostrovsky 2016-12-08 59 /* ea3186b9572a1b0 arch/x86/include/asm/pgtable_32.h Arvind Sankar 2020-10-29 60 * This is used to calculate the .brk reservation for initial pagetables. ea3186b9572a1b0 arch/x86/include/asm/pgtable_32.h Arvind Sankar 2020-10-29 61 * Enough space is reserved to allocate pagetables sufficient to cover all ea3186b9572a1b0 arch/x86/include/asm/pgtable_32.h Arvind Sankar 2020-10-29 62 * of LOWMEM_PAGES, which is an upper bound on the size of the direct map of ea3186b9572a1b0 arch/x86/include/asm/pgtable_32.h Arvind Sankar 2020-10-29 63 * lowmem. 1e620f9b23e598a arch/x86/include/asm/pgtable_32.h Boris Ostrovsky 2016-12-08 64 * ea3186b9572a1b0 arch/x86/include/asm/pgtable_32.h Arvind Sankar 2020-10-29 65 * With PAE paging (PTRS_PER_PMD > 1), we allocate PTRS_PER_PGD == 4 pages for ea3186b9572a1b0 arch/x86/include/asm/pgtable_32.h Arvind Sankar 2020-10-29 66 * the PMD's in addition to the pages required for the last level pagetables. 1e620f9b23e598a arch/x86/include/asm/pgtable_32.h Boris Ostrovsky 2016-12-08 67 */ 1e620f9b23e598a arch/x86/include/asm/pgtable_32.h Boris Ostrovsky 2016-12-08 @68 #if PTRS_PER_PMD > 1 1e620f9b23e598a arch/x86/include/asm/pgtable_32.h Boris Ostrovsky 2016-12-08 69 #define PAGE_TABLE_SIZE(pages) (((pages) / PTRS_PER_PMD) + PTRS_PER_PGD) 1e620f9b23e598a arch/x86/include/asm/pgtable_32.h Boris Ostrovsky 2016-12-08 70 #else 1e620f9b23e598a arch/x86/include/asm/pgtable_32.h Boris Ostrovsky 2016-12-08 71 #define PAGE_TABLE_SIZE(pages) ((pages) / PTRS_PER_PGD) 1e620f9b23e598a arch/x86/include/asm/pgtable_32.h Boris Ostrovsky 2016-12-08 72 #endif
1e620f9b23e598a arch/x86/include/asm/pgtable_32.h Boris Ostrovsky 2016-12-08 73
:::::: The code at line 68 was first introduced by commit
:::::: 1e620f9b23e598ab936ece12233e98e97930b692 x86/boot/32: Convert the 32-bit pgtable setup code from assembly to C
:::::: TO: Boris Ostrovsky <[email protected]> :::::: CC: Ingo Molnar <[email protected]>
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki