[rppt:generic-set-memory/v0.1 5/14] include/linux/pgtable.h:2374:24: error: 'PMD_SIZE' undeclared; did you mean 'P4D_SIZE'?

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild-all
Message-ID <[email protected]>
Hi Mike,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git generic-set-memory/v0.1
head:   638eb4b634f16c38ed87203f47ffed3cd5b1a67c
commit: cb2eab77f64c1ad09dce2ac836357cf03966fb20 [5/14] x86/mm/pat: use a generic helper for the large page size
config: m68k-randconfig-r073-20260721 (https://download.01.org/0day-ci/archive/20260721/[email protected]/config)
compiler: m68k-linux-gcc (GCC) 16.1.0
smatch: v0.5.0-9187-g5189e3fb
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260721/[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 >>):

   In file included from include/linux/mm.h:31,
                    from include/linux/cpuset.h:17,
                    from kernel/sched/sched.h:33,
                    from kernel/sched/rq-offsets.c:5:
   include/linux/pgtable.h: In function 'pgtable_level_size':
>> include/linux/pgtable.h:2374:24: error: 'PMD_SIZE' undeclared (first use in this function); did you mean 'P4D_SIZE'?
    2374 |                 return PMD_SIZE;
         |                        ^~~~~~~~
         |                        P4D_SIZE
   include/linux/pgtable.h:2374:24: note: each undeclared identifier is reported only once for each function it appears in
   In file included from include/asm-generic/pgtable-nopud.h:7,
                    from arch/m68k/include/asm/pgtable_no.h:5,
                    from arch/m68k/include/asm/pgtable.h:8,
                    from include/linux/pgtable.h:6:
>> include/asm-generic/pgtable-nop4d.h:11:33: error: 'PGDIR_SHIFT' undeclared (first use in this function); did you mean 'P4D_SHIFT'?
      11 | #define P4D_SHIFT               PGDIR_SHIFT
         |                                 ^~~~~~~~~~~
   include/asm-generic/pgtable-nopud.h:18:25: note: in expansion of macro 'P4D_SHIFT'
      18 | #define PUD_SHIFT       P4D_SHIFT
         |                         ^~~~~~~~~
   include/asm-generic/pgtable-nopud.h:20:33: note: in expansion of macro 'PUD_SHIFT'
      20 | #define PUD_SIZE        (1UL << PUD_SHIFT)
         |                                 ^~~~~~~~~
   include/linux/pgtable.h:2376:24: note: in expansion of macro 'PUD_SIZE'
    2376 |                 return PUD_SIZE;
         |                        ^~~~~~~~
>> include/linux/pgtable.h:2380:24: error: 'PGDIR_SIZE' undeclared (first use in this function); did you mean 'P4D_SIZE'?
    2380 |                 return PGDIR_SIZE;
         |                        ^~~~~~~~~~
         |                        P4D_SIZE
   make[3]: *** [scripts/Makefile.build:184: kernel/sched/rq-offsets.s] Error 1
   make[3]: Target 'prepare' not remade because of errors.
   make[2]: *** [Makefile:1405: prepare0] Error 2
   make[2]: Target 'prepare' not remade because of errors.
   make[1]: *** [Makefile:248: __sub-make] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:248: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +2374 include/linux/pgtable.h

  2366	
  2367	/* Size of the memory mapped by a single leaf entry at @level */
  2368	static inline unsigned long pgtable_level_size(enum pgtable_level level)
  2369	{
  2370		switch (level) {
  2371		case PGTABLE_LEVEL_PTE:
  2372			return PAGE_SIZE;
  2373		case PGTABLE_LEVEL_PMD:
> 2374			return PMD_SIZE;
  2375		case PGTABLE_LEVEL_PUD:
  2376			return PUD_SIZE;
  2377		case PGTABLE_LEVEL_P4D:
  2378			return P4D_SIZE;
  2379		default:
> 2380			return PGDIR_SIZE;
  2381		}
  2382	}
  2383	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.