public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kiryl Shutsemau <kas@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [kas:pte_size 15/16] mm/vmalloc.c:806:10: error: call to undeclared function 'p4d_pfn'; ISO C99 and later do not support implicit function declarations
Date: Fri, 13 Feb 2026 19:24:01 +0800	[thread overview]
Message-ID: <202602131945.oCd3GIUM-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kas/linux.git pte_size
head:   f562d70c53ccc0213b4afbf20fc312d85f9972bb
commit: abf3930fa6ed33226e0965bedc64f461c3647656 [15/16] tmp
config: um-allnoconfig (https://download.01.org/0day-ci/archive/20260213/202602131945.oCd3GIUM-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 9b8addffa70cee5b2acc5454712d9cf78ce45710)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260213/202602131945.oCd3GIUM-lkp@intel.com/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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602131945.oCd3GIUM-lkp@intel.com/

All errors (new ones prefixed by >>):

>> mm/vmalloc.c:806:10: error: call to undeclared function 'p4d_pfn'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     806 |                 return p4d_pfn(*p4d) + ((addr & ~P4D_MASK) >> PTE_SHIFT);
         |                        ^
   1 error generated.


vim +/p4d_pfn +806 mm/vmalloc.c

   776	
   777	/*
   778	 * Map a vmalloc()-space virtual address to the physical page frame number.
   779	 */
   780	unsigned long vmalloc_to_pfn(const void *vmalloc_addr)
   781	{
   782		unsigned long addr = (unsigned long) vmalloc_addr;
   783		pgd_t *pgd = pgd_offset_k(addr);
   784		p4d_t *p4d;
   785		pud_t *pud;
   786		pmd_t *pmd;
   787		pte_t *ptep, pte;
   788	
   789		/*
   790		 * XXX we might need to change this if we add VIRTUAL_BUG_ON for
   791		 * architectures that do not vmalloc module space
   792		 */
   793		VIRTUAL_BUG_ON(!is_vmalloc_or_module_addr(vmalloc_addr));
   794	
   795		if (pgd_none(*pgd))
   796			return 0;
   797		if (WARN_ON_ONCE(pgd_leaf(*pgd)))
   798			return 0; /* XXX: no allowance for huge pgd */
   799		if (WARN_ON_ONCE(pgd_bad(*pgd)))
   800			return 0;
   801	
   802		p4d = p4d_offset(pgd, addr);
   803		if (p4d_none(*p4d))
   804			return 0;
   805		if (p4d_leaf(*p4d))
 > 806			return p4d_pfn(*p4d) + ((addr & ~P4D_MASK) >> PTE_SHIFT);
   807		if (WARN_ON_ONCE(p4d_bad(*p4d)))
   808			return 0;
   809	
   810		pud = pud_offset(p4d, addr);
   811		if (pud_none(*pud))
   812			return 0;
   813		if (pud_leaf(*pud))
   814			return pud_pfn(*pud) + ((addr & ~PUD_MASK) >> PTE_SHIFT);
   815		if (WARN_ON_ONCE(pud_bad(*pud)))
   816			return 0;
   817	
   818		pmd = pmd_offset(pud, addr);
   819		if (pmd_none(*pmd))
   820			return 0;
   821		if (pmd_leaf(*pmd))
   822			return pmd_pfn(*pmd) + ((addr & ~PMD_MASK) >> PTE_SHIFT);
   823		if (WARN_ON_ONCE(pmd_bad(*pmd)))
   824			return 0;
   825	
   826		ptep = pte_offset_kernel(pmd, addr);
   827		pte = ptep_get(ptep);
   828		if (pte_present(pte))
   829			return pte_pfn(pte);
   830	
   831		return 0;
   832	}
   833	EXPORT_SYMBOL(vmalloc_to_pfn);
   834	

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

                 reply	other threads:[~2026-02-13 11:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202602131945.oCd3GIUM-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kas@kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox