Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [akpm-mm:mm-unstable 25/274] mm/hugetlb.c:7281:17: error: implicit declaration of function '__huge_pmd_unshare'; did you mean 'huge_pmd_unshare'?
@ 2026-05-14  7:04 kernel test robot
  2026-05-14  7:31 ` Lorenzo Stoakes
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2026-05-14  7:04 UTC (permalink / raw)
  To: Lorenzo Stoakes
  Cc: oe-kbuild-all, David Hildenbrand, Andrew Morton,
	Linux Memory Management List, mm-commits

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
head:   444fc9435e57157fcf30fc99aee44997f3458641
commit: 2bb8fe16f7bf4487248c9ff847fcf189c45b9508 [25/274] mm/hugetlb: avoid false positive lockdep assertion
config: s390-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20260514/202605140938.6Mcv6k8i-lkp@intel.com/config)
compiler: s390x-linux-gnu-gcc (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260514/202605140938.6Mcv6k8i-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/202605140938.6Mcv6k8i-lkp@intel.com/

All errors (new ones prefixed by >>):

   mm/hugetlb.c: In function 'hugetlb_unshare_pmds':
>> mm/hugetlb.c:7281:17: error: implicit declaration of function '__huge_pmd_unshare'; did you mean 'huge_pmd_unshare'? [-Wimplicit-function-declaration]
    7281 |                 __huge_pmd_unshare(&tlb, vma, address, ptep, take_locks);
         |                 ^~~~~~~~~~~~~~~~~~
         |                 huge_pmd_unshare


vim +7281 mm/hugetlb.c

  7233	
  7234	/*
  7235	 * If @take_locks is false, the caller must ensure that no concurrent page table
  7236	 * access can happen (except for gup_fast() and hardware page walks).
  7237	 * If @take_locks is true, we take the hugetlb VMA lock (to lock out things like
  7238	 * concurrent page fault handling) and the file rmap lock.
  7239	 */
  7240	static void hugetlb_unshare_pmds(struct vm_area_struct *vma,
  7241					   unsigned long start,
  7242					   unsigned long end,
  7243					   bool take_locks)
  7244	{
  7245		struct hstate *h = hstate_vma(vma);
  7246		unsigned long sz = huge_page_size(h);
  7247		struct mm_struct *mm = vma->vm_mm;
  7248		struct mmu_notifier_range range;
  7249		struct mmu_gather tlb;
  7250		unsigned long address;
  7251		spinlock_t *ptl;
  7252		pte_t *ptep;
  7253	
  7254		if (!(vma->vm_flags & VM_MAYSHARE))
  7255			return;
  7256	
  7257		if (start >= end)
  7258			return;
  7259	
  7260		flush_cache_range(vma, start, end);
  7261		tlb_gather_mmu_vma(&tlb, vma);
  7262	
  7263		/*
  7264		 * No need to call adjust_range_if_pmd_sharing_possible(), because
  7265		 * we have already done the PUD_SIZE alignment.
  7266		 */
  7267		mmu_notifier_range_init(&range, MMU_NOTIFY_CLEAR, 0, mm,
  7268					start, end);
  7269		mmu_notifier_invalidate_range_start(&range);
  7270		if (take_locks) {
  7271			hugetlb_vma_lock_write(vma);
  7272			i_mmap_lock_write(vma->vm_file->f_mapping);
  7273		} else {
  7274			i_mmap_assert_write_locked(vma->vm_file->f_mapping);
  7275		}
  7276		for (address = start; address < end; address += PUD_SIZE) {
  7277			ptep = hugetlb_walk(vma, address, sz);
  7278			if (!ptep)
  7279				continue;
  7280			ptl = huge_pte_lock(h, mm, ptep);
> 7281			__huge_pmd_unshare(&tlb, vma, address, ptep, take_locks);
  7282			spin_unlock(ptl);
  7283		}
  7284		huge_pmd_unshare_flush(&tlb, vma);
  7285		if (take_locks) {
  7286			i_mmap_unlock_write(vma->vm_file->f_mapping);
  7287			hugetlb_vma_unlock_write(vma);
  7288		}
  7289		/*
  7290		 * No need to call mmu_notifier_arch_invalidate_secondary_tlbs(), see
  7291		 * Documentation/mm/mmu_notifier.rst.
  7292		 */
  7293		mmu_notifier_invalidate_range_end(&range);
  7294		tlb_finish_mmu(&tlb);
  7295	}
  7296	

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [akpm-mm:mm-unstable 25/274] mm/hugetlb.c:7281:17: error: implicit declaration of function '__huge_pmd_unshare'; did you mean 'huge_pmd_unshare'?
  2026-05-14  7:04 [akpm-mm:mm-unstable 25/274] mm/hugetlb.c:7281:17: error: implicit declaration of function '__huge_pmd_unshare'; did you mean 'huge_pmd_unshare'? kernel test robot
@ 2026-05-14  7:31 ` Lorenzo Stoakes
  0 siblings, 0 replies; 2+ messages in thread
From: Lorenzo Stoakes @ 2026-05-14  7:31 UTC (permalink / raw)
  To: kernel test robot
  Cc: oe-kbuild-all, David Hildenbrand, Andrew Morton,
	Linux Memory Management List, mm-commits

On Thu, May 14, 2026 at 09:04:19AM +0200, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
> head:   444fc9435e57157fcf30fc99aee44997f3458641
> commit: 2bb8fe16f7bf4487248c9ff847fcf189c45b9508 [25/274] mm/hugetlb: avoid false positive lockdep assertion
> config: s390-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20260514/202605140938.6Mcv6k8i-lkp@intel.com/config)
> compiler: s390x-linux-gnu-gcc (Debian 14.2.0-19) 14.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260514/202605140938.6Mcv6k8i-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/202605140938.6Mcv6k8i-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
>    mm/hugetlb.c: In function 'hugetlb_unshare_pmds':
> >> mm/hugetlb.c:7281:17: error: implicit declaration of function '__huge_pmd_unshare'; did you mean 'huge_pmd_unshare'? [-Wimplicit-function-declaration]
>     7281 |                 __huge_pmd_unshare(&tlb, vma, address, ptep, take_locks);
>          |                 ^~~~~~~~~~~~~~~~~~
>          |                 huge_pmd_unshare
>

Ack, missed the !CONFIG_HUGETLB_PMD_PAGE_TABLE_SHARING case. Will send
a patch for this :)

Cheers, Lorenzo

>
> vim +7281 mm/hugetlb.c
>
>   7233
>   7234	/*
>   7235	 * If @take_locks is false, the caller must ensure that no concurrent page table
>   7236	 * access can happen (except for gup_fast() and hardware page walks).
>   7237	 * If @take_locks is true, we take the hugetlb VMA lock (to lock out things like
>   7238	 * concurrent page fault handling) and the file rmap lock.
>   7239	 */
>   7240	static void hugetlb_unshare_pmds(struct vm_area_struct *vma,
>   7241					   unsigned long start,
>   7242					   unsigned long end,
>   7243					   bool take_locks)
>   7244	{
>   7245		struct hstate *h = hstate_vma(vma);
>   7246		unsigned long sz = huge_page_size(h);
>   7247		struct mm_struct *mm = vma->vm_mm;
>   7248		struct mmu_notifier_range range;
>   7249		struct mmu_gather tlb;
>   7250		unsigned long address;
>   7251		spinlock_t *ptl;
>   7252		pte_t *ptep;
>   7253
>   7254		if (!(vma->vm_flags & VM_MAYSHARE))
>   7255			return;
>   7256
>   7257		if (start >= end)
>   7258			return;
>   7259
>   7260		flush_cache_range(vma, start, end);
>   7261		tlb_gather_mmu_vma(&tlb, vma);
>   7262
>   7263		/*
>   7264		 * No need to call adjust_range_if_pmd_sharing_possible(), because
>   7265		 * we have already done the PUD_SIZE alignment.
>   7266		 */
>   7267		mmu_notifier_range_init(&range, MMU_NOTIFY_CLEAR, 0, mm,
>   7268					start, end);
>   7269		mmu_notifier_invalidate_range_start(&range);
>   7270		if (take_locks) {
>   7271			hugetlb_vma_lock_write(vma);
>   7272			i_mmap_lock_write(vma->vm_file->f_mapping);
>   7273		} else {
>   7274			i_mmap_assert_write_locked(vma->vm_file->f_mapping);
>   7275		}
>   7276		for (address = start; address < end; address += PUD_SIZE) {
>   7277			ptep = hugetlb_walk(vma, address, sz);
>   7278			if (!ptep)
>   7279				continue;
>   7280			ptl = huge_pte_lock(h, mm, ptep);
> > 7281			__huge_pmd_unshare(&tlb, vma, address, ptep, take_locks);
>   7282			spin_unlock(ptl);
>   7283		}
>   7284		huge_pmd_unshare_flush(&tlb, vma);
>   7285		if (take_locks) {
>   7286			i_mmap_unlock_write(vma->vm_file->f_mapping);
>   7287			hugetlb_vma_unlock_write(vma);
>   7288		}
>   7289		/*
>   7290		 * No need to call mmu_notifier_arch_invalidate_secondary_tlbs(), see
>   7291		 * Documentation/mm/mmu_notifier.rst.
>   7292		 */
>   7293		mmu_notifier_invalidate_range_end(&range);
>   7294		tlb_finish_mmu(&tlb);
>   7295	}
>   7296
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-14  7:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-14  7:04 [akpm-mm:mm-unstable 25/274] mm/hugetlb.c:7281:17: error: implicit declaration of function '__huge_pmd_unshare'; did you mean 'huge_pmd_unshare'? kernel test robot
2026-05-14  7:31 ` Lorenzo Stoakes

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