[merged mm-stable] mm-introduce-pud_is_huge-helper.patch removed from -mm tree

Andrew Morton <[email protected]>
Newsgroups org.kernel.vger.mm-commits
Message-ID <[email protected]>
The quilt patch titled
     Subject: mm: introduce pud_is_huge() helper
has been removed from the -mm tree.  Its filename was
     mm-introduce-pud_is_huge-helper.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: Kefeng Wang <[email protected]>
Subject: mm: introduce pud_is_huge() helper
Date: Fri, 17 Jul 2026 17:13:42 +0800

Patch series "mm: mincore: misc cleanups", v3.

This series cleans up and simplifies the mincore.  Most importantly, it
removes the historical special behavior that always reports VM_PFNMAP
pages as non-resident.


This patch (of 6):

Introduce the pud_is_huge() helper function to check whether a PUD is a
huge PUD or a software leaf entry.  Note that, unlike PMD, PUD currently
does not support transparent migration entries or device private entries. 
However, the function still includes `!pud_none()` branches to accommodate
potential future implementations.

Link: https://lore.kernel.org/[email protected]
Link: https://lore.kernel.org/[email protected]
Signed-off-by: Kefeng Wang <[email protected]>
Acked-by: David Hildenbrand (Arm) <[email protected]>
Cc: Jann Horn <[email protected]>
Cc: Liam R. Howlett <[email protected]>
Cc: Lorenzo Stoakes <[email protected]>
Cc: Pedro Falcato <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: Zi Yan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

 include/linux/huge_mm.h |   23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

--- a/include/linux/huge_mm.h~mm-introduce-pud_is_huge-helper
+++ a/include/linux/huge_mm.h
@@ -472,6 +472,24 @@ void split_huge_pmd_address(struct vm_ar
 void __split_huge_pud(struct vm_area_struct *vma, pud_t *pud,
 		unsigned long address);
 
+/**
+ * pud_is_huge() - Is this PUD either a huge PUD entry or a software leaf entry?
+ * @pud: The PUD to check.
+ *
+ * This is similar to pmd_is_huge(), but it checks at the PUD level.
+ *
+ * Returns: true if this PUD is huge, false otherwise.
+ */
+static inline bool pud_is_huge(pud_t pud)
+{
+	if (pud_present(pud))
+		return pud_trans_huge(pud);
+	else if (!pud_none(pud))
+		return true;
+
+	return false;
+}
+
 #ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD
 int change_huge_pud(struct mmu_gather *tlb, struct vm_area_struct *vma,
 		    pud_t *pudp, unsigned long addr, pgprot_t newprot,
@@ -798,6 +816,11 @@ static inline bool pmd_is_huge(pmd_t pmd
 {
 	return false;
 }
+
+static inline bool pud_is_huge(pud_t pud)
+{
+	return false;
+}
 #endif /* CONFIG_TRANSPARENT_HUGEPAGE */
 
 static inline bool is_pmd_order(unsigned int order)
_

Patches currently in -mm which might be from [email protected] are
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.