public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [kas:uffd 4/12] mm/userfaultfd.c:427:10: error: call to undeclared function 'pmd_modify'; ISO C99 and later do not support implicit function declarations
@ 2026-04-15 14:25 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-04-15 14:25 UTC (permalink / raw)
  To: Kiryl Shutsemau (Meta); +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kas/linux.git uffd
head:   bfa1e12c7a014c9ce5d1ae4b8b43dcb8e3d62965
commit: 83ce0c5a2d4e93266638ef2f1d2b58166bae1e8d [4/12] userfaultfd: UFFDIO_CONTINUE for anonymous memory
config: powerpc-randconfig-001-20260415 (https://download.01.org/0day-ci/archive/20260415/202604152204.YW3R3qP0-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260415/202604152204.YW3R3qP0-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/202604152204.YW3R3qP0-lkp@intel.com/

All errors (new ones prefixed by >>):

>> mm/userfaultfd.c:427:10: error: call to undeclared function 'pmd_modify'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     427 |         entry = pmd_modify(orig_pmd, vma->vm_page_prot);
         |                 ^
   mm/userfaultfd.c:427:10: note: did you mean 'pte_modify'?
   arch/powerpc/include/asm/nohash/pgtable.h:295:21: note: 'pte_modify' declared here
     295 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
         |                     ^
>> mm/userfaultfd.c:427:8: error: assigning to 'pmd_t' from incompatible type 'int'
     427 |         entry = pmd_modify(orig_pmd, vma->vm_page_prot);
         |               ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> mm/userfaultfd.c:428:10: error: call to undeclared function 'pmd_mkyoung'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     428 |         entry = pmd_mkyoung(entry);
         |                 ^
   mm/userfaultfd.c:428:8: error: assigning to 'pmd_t' from incompatible type 'int'
     428 |         entry = pmd_mkyoung(entry);
         |               ^ ~~~~~~~~~~~~~~~~~~
>> mm/userfaultfd.c:430:11: error: call to undeclared function 'pmd_wrprotect'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     430 |                 entry = pmd_wrprotect(entry);
         |                         ^
   mm/userfaultfd.c:430:11: note: did you mean 'pte_wrprotect'?
   arch/powerpc/include/asm/nohash/32/pte-8xx.h:87:21: note: 'pte_wrprotect' declared here
      87 | static inline pte_t pte_wrprotect(pte_t pte)
         |                     ^
   mm/userfaultfd.c:430:9: error: assigning to 'pmd_t' from incompatible type 'int'
     430 |                 entry = pmd_wrprotect(entry);
         |                       ^ ~~~~~~~~~~~~~~~~~~~~
>> mm/userfaultfd.c:431:2: error: call to undeclared function 'set_pmd_at'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     431 |         set_pmd_at(mm, addr & HPAGE_PMD_MASK, pmd, entry);
         |         ^
>> mm/userfaultfd.c:432:2: error: call to undeclared function 'update_mmu_cache_pmd'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     432 |         update_mmu_cache_pmd(vma, addr, pmd);
         |         ^
   mm/userfaultfd.c:432:2: note: did you mean 'update_mmu_cache_range'?
   arch/powerpc/include/asm/pgtable.h:136:20: note: 'update_mmu_cache_range' declared here
     136 | static inline void update_mmu_cache_range(struct vm_fault *vmf,
         |                    ^
   8 errors generated.


vim +/pmd_modify +427 mm/userfaultfd.c

   411	
   412	static int mfill_atomic_pmd_continue_anon(struct mm_struct *mm,
   413						  struct vm_area_struct *vma,
   414						  unsigned long addr,
   415						  pmd_t *pmd, pmd_t orig_pmd,
   416						  uffd_flags_t flags)
   417	{
   418		spinlock_t *ptl;
   419		pmd_t entry;
   420	
   421		ptl = pmd_lock(mm, pmd);
   422		if (unlikely(!pmd_same(pmdp_get(pmd), orig_pmd))) {
   423			spin_unlock(ptl);
   424			return -EAGAIN;
   425		}
   426	
 > 427		entry = pmd_modify(orig_pmd, vma->vm_page_prot);
 > 428		entry = pmd_mkyoung(entry);
   429		if (flags & MFILL_ATOMIC_WP)
 > 430			entry = pmd_wrprotect(entry);
 > 431		set_pmd_at(mm, addr & HPAGE_PMD_MASK, pmd, entry);
 > 432		update_mmu_cache_pmd(vma, addr, pmd);
   433		spin_unlock(ptl);
   434		return 0;
   435	}
   436	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-04-15 14:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-15 14:25 [kas:uffd 4/12] mm/userfaultfd.c:427:10: error: call to undeclared function 'pmd_modify'; ISO C99 and later do not support implicit function declarations kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox