Skip to contentSkip to conversation

mm-define-__pte_leaf_size-to-also-take-a-pmd-entry.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jul 12, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: define __pte_leaf_size() to also take a PMD entry
has been removed from the -mm tree. Its filename was
mm-define-__pte_leaf_size-to-also-take-a-pmd-entry.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: Christophe Leroy <[email protected]>
Subject: mm: define __pte_leaf_size() to also take a PMD entry
Date: Tue, 2 Jul 2024 15:51:19 +0200

On powerpc 8xx, when a page is 8M size, the information is in the PMD entry. So allow architectures to provide __pte_leaf_size() instead of pte_leaf_size() and provide the PMD entry to that function.

When __pte_leaf_size() is not defined, define it as a pte_leaf_size() so that architectures not interested in the PMD arguments are not impacted.

Only define a default pte_leaf_size() when __pte_leaf_size() is not defined to make sure nobody adds new calls to pte_leaf_size() in the core.

---

 include/linux/pgtable.h |    3 +++
 kernel/events/core.c    |    2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
include/linux/pgtable.h renamed from include/linux/pgtable.h~mm-define-__pte_leaf_size-to-also-take-a-pmd-entry +3 -0
@@ -1907,9 +1907,12 @@ typedef unsigned int pgtbl_mod_mask;
 #ifndef pmd_leaf_size
 #define pmd_leaf_size(x) PMD_SIZE
 #endif
+#ifndef __pte_leaf_size
 #ifndef pte_leaf_size
 #define pte_leaf_size(x) PAGE_SIZE
 #endif
+#define __pte_leaf_size(x,y) pte_leaf_size(y)
+#endif
 
 /*
  * We always define pmd_pfn for all archs as it's used in lots of generic
kernel/events/core.c renamed from kernel/events/core.c~mm-define-__pte_leaf_size-to-also-take-a-pmd-entry +1 -1
@@ -7609,7 +7609,7 @@ again:
 
 	pte = ptep_get_lockless(ptep);
 	if (pte_present(pte))
-		size = pte_leaf_size(pte);
+		size = __pte_leaf_size(pmd, pte);
 	pte_unmap(ptep);
 #endif /* CONFIG_HAVE_GUP_FAST */
 

_

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