Skip to contentSkip to conversation

mm-page_vma_mapped-guard-check_pmd-with-config_transparent_hugepage.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Oct 9

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/page_vma_mapped: guard check_pmd() with CONFIG_TRANSPARENT_HUGEPAGE
has been removed from the -mm tree. Its filename was
mm-page_vma_mapped-guard-check_pmd-with-config_transparent_hugepage.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Wei Yang <[email protected]>
Subject: mm/page_vma_mapped: guard check_pmd() with CONFIG_TRANSPARENT_HUGEPAGE
Date: Wed, 24 Jun 2026 08:23:59 +0000

The kernel test robot reported a build failure on the parisc architecture when expanding HPAGE_PMD_NR in check_pmd().

mm/page_vma_mapped.c:142:13: note: in expansion of macro 'HPAGE_PMD_NR'

     if ((pfn + HPAGE_PMD_NR - 1) < pvmw->pfn)
                ^~~~~~~~~~~~

The config [1] in report link shows neither TRANSPARENT_HUGEPAGE nor HUGETLB_PAGE is defined. Then trigger the BUILD_BUG.

Fix it by define check_pmd() under CONFIG_TRANSPARENT_HUGEPAGE.

Fixes 2aff7a4755be ("mm: Convert page_vma_mapped_walk to work on PFNs")
Cc David Hildenbrand <[email protected]>
Cc Harry Yoo <[email protected]>
Cc Jann Horn <[email protected]>
Cc Lance Yang <[email protected]>
Cc Liam R. Howlett <[email protected]>
Cc Lorenzo Stoakes <[email protected]>
Cc Matthew Wilcox (Oracle) <[email protected]>
Cc Rik van Riel <[email protected]>
Cc Vlastimil Babka <[email protected]>

---

 mm/page_vma_mapped.c |    7 +++++++
 1 file changed, 7 insertions(+)
mm/page_vma_mapped.c renamed from mm/page_vma_mapped.c~mm-page_vma_mapped-guard-check_pmd-with-config_transparent_hugepage +7 -0
@@ -142,6 +142,7 @@ static bool check_pte(struct page_vma_ma
 	return true;
 }
 
+#ifdef CONFIG_TRANSPARENT_HUGEPAGE
 /* Returns true if the two ranges overlap.  Careful to not overflow. */
 static bool check_pmd(unsigned long pfn, struct page_vma_mapped_walk *pvmw)
 {
@@ -151,6 +152,12 @@ static bool check_pmd(unsigned long pfn,
 		return false;
 	return true;
 }
+#else
+static bool check_pmd(unsigned long pfn, struct page_vma_mapped_walk *pvmw)
+{
+	return false;
+}
+#endif
 
 static void step_forward(struct page_vma_mapped_walk *pvmw, unsigned long size)
 {

_

Patches currently in -mm which might be from [email protected] are