From: kernel test robot <lkp@intel.com>
To: Peter Xu <peterx@redhat.com>
Cc: oe-kbuild-all@lists.linux.dev,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>,
Jason Gunthorpe <jgg@nvidia.com>
Subject: [akpm-mm:mm-unstable 115/141] mm/gup.c:536:29: error: implicit declaration of function 'pud_pfn'; did you mean 'pmd_pfn'?
Date: Sat, 23 Mar 2024 15:12:08 +0800 [thread overview]
Message-ID: <202403231529.HRev1zcD-lkp@intel.com> (raw)
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@intel.com/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@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/202403231529.HRev1zcD-lkp@intel.com/
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
reply other threads:[~2024-03-23 7:12 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=202403231529.HRev1zcD-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=jgg@nvidia.com \
--cc=linux-mm@kvack.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=peterx@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).