[akpm-mm:mm-unstable 115/141] mm/gup.c:536:29: error: implicit declaration of function 'pud_pfn'; did you mean 'pmd_pfn'?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
head:   af520f81c51001f7ccdf0579fc73df282b26292d
commit: 529f3b89b7333564792458ca7be06f5bff258d23 [115/141] mm/gup: handle huge pud for follow_pud_mask()
config: sh-defconfig (https://download.01.org/0day-ci/archive/20240323/202403231529.HRev1zcD-lkp@xxxxxxxxx/config)
compiler: sh4-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240323/202403231529.HRev1zcD-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403231529.HRev1zcD-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   mm/gup.c: In function 'follow_huge_pud':
>> mm/gup.c:536:29: error: implicit declaration of function 'pud_pfn'; did you mean 'pmd_pfn'? [-Werror=implicit-function-declaration]
     536 |         unsigned long pfn = pud_pfn(pud);
         |                             ^~~~~~~
         |                             pmd_pfn
   cc1: some warnings being treated as errors


vim +536 mm/gup.c

   527	
   528	#ifdef CONFIG_PGTABLE_HAS_HUGE_LEAVES
   529	static struct page *follow_huge_pud(struct vm_area_struct *vma,
   530					    unsigned long addr, pud_t *pudp,
   531					    int flags, struct follow_page_context *ctx)
   532	{
   533		struct mm_struct *mm = vma->vm_mm;
   534		struct page *page;
   535		pud_t pud = *pudp;
 > 536		unsigned long pfn = pud_pfn(pud);
   537		int ret;
   538	
   539		assert_spin_locked(pud_lockptr(mm, pudp));
   540	
   541		if ((flags & FOLL_WRITE) && !pud_write(pud))
   542			return NULL;
   543	
   544		if (!pud_present(pud))
   545			return NULL;
   546	
   547		pfn += (addr & ~PUD_MASK) >> PAGE_SHIFT;
   548	
   549		if (IS_ENABLED(CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD) &&
   550		    pud_devmap(pud)) {
   551			/*
   552			 * device mapped pages can only be returned if the caller
   553			 * will manage the page reference count.
   554			 *
   555			 * At least one of FOLL_GET | FOLL_PIN must be set, so
   556			 * assert that here:
   557			 */
   558			if (!(flags & (FOLL_GET | FOLL_PIN)))
   559				return ERR_PTR(-EEXIST);
   560	
   561			if (flags & FOLL_TOUCH)
   562				touch_pud(vma, addr, pudp, flags & FOLL_WRITE);
   563	
   564			ctx->pgmap = get_dev_pagemap(pfn, ctx->pgmap);
   565			if (!ctx->pgmap)
   566				return ERR_PTR(-EFAULT);
   567		}
   568	
   569		page = pfn_to_page(pfn);
   570	
   571		if (!pud_devmap(pud) && !pud_write(pud) &&
   572		    gup_must_unshare(vma, flags, page))
   573			return ERR_PTR(-EMLINK);
   574	
   575		ret = try_grab_page(page, flags);
   576		if (ret)
   577			page = ERR_PTR(ret);
   578		else
   579			ctx->page_mask = HPAGE_PUD_NR - 1;
   580	
   581		return page;
   582	}
   583	#else  /* CONFIG_PGTABLE_HAS_HUGE_LEAVES */
   584	static struct page *follow_huge_pud(struct vm_area_struct *vma,
   585					    unsigned long addr, pud_t *pudp,
   586					    int flags, struct follow_page_context *ctx)
   587	{
   588		return NULL;
   589	}
   590	#endif	/* CONFIG_PGTABLE_HAS_HUGE_LEAVES */
   591	

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux