[davidhildenbrand:get_dummy 14/21] include/linux/pgtable.h:2351:13: error: implicit declaration of function 'mm_pmd_folded'

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

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

tree:   https://github.com/davidhildenbrand/linux get_dummy
head:   112a153a97494becabd764fe6257578ba908801f
commit: db92928e80f5332bbfca9a70beaef62d46a0c9de [14/21] x86: mm: carve out the generic compile-time folded pgtable case in effective_prot()
config: m68k-allnoconfig (https://download.01.org/0day-ci/archive/20260827/[email protected]/config)
compiler: m68k-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260827/[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 'mm_first_pgtable_level':
>> include/linux/pgtable.h:2351:13: error: implicit declaration of function 'mm_pmd_folded' [-Wimplicit-function-declaration]
    2351 |         if (mm_pmd_folded(mm))
         |             ^~~~~~~~~~~~~
>> include/linux/pgtable.h:2353:13: error: implicit declaration of function 'mm_pud_folded' [-Wimplicit-function-declaration]
    2353 |         if (mm_pud_folded(mm))
         |             ^~~~~~~~~~~~~
>> include/linux/pgtable.h:2355:13: error: implicit declaration of function 'mm_p4d_folded' [-Wimplicit-function-declaration]
    2355 |         if (mm_p4d_folded(mm))
         |             ^~~~~~~~~~~~~
   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:1410: 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 +/mm_pmd_folded +2351 include/linux/pgtable.h

  2331	
  2332	/**
  2333	 * mm_first_pgtable_level - return the first non-folded page-table level
  2334	 * @mm: The mm structure.
  2335	 *
  2336	 * With runtime- or compile-time folded page tables, page-table walkers
  2337	 * effectively skip the folded top-level page tables, treating them as
  2338	 * always-present entries pointing to the next lower-level page table.
  2339	 *
  2340	 * Return the first page-table level in @mm that is not folded.
  2341	 *
  2342	 * Return: the first non-folded page-table level.
  2343	 */
  2344	static inline enum pgtable_level mm_first_pgtable_level(struct mm_struct *mm)
  2345	{
  2346		/*
  2347		 * "PMD folded" actually means "PMD is folded into PUD", and
  2348		 * pud_present() etc. are hard-coded to look like present page table
  2349		 * levels, whereby pmd_present() etc. contain real logic.
  2350		 */
> 2351		if (mm_pmd_folded(mm))
  2352			return PGTABLE_LEVEL_PMD;
> 2353		if (mm_pud_folded(mm))
  2354			return PGTABLE_LEVEL_PUD;
> 2355		if (mm_p4d_folded(mm))
  2356			return PGTABLE_LEVEL_P4D;
  2357		return PGTABLE_LEVEL_PGD;
  2358	}
  2359	

--
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.