Skip to contentSkip to conversation

mm-ppc-define-pxd_large-with-pxd_leaf.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Mar 6, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/powerpc: define pXd_large() with pXd_leaf()
has been removed from the -mm tree. Its filename was
mm-ppc-define-pxd_large-with-pxd_leaf.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: Peter Xu <[email protected]>
Subject: mm/powerpc: define pXd_large() with pXd_leaf()
Date: Tue, 5 Mar 2024 12:37:41 +0800

Patch series "mm/treewide: Replace pXd_large() with pXd_leaf()", v3.

These two APIs are mostly always the same. It's confusing to have both of them. Merge them into one. Here I used pXd_leaf() only because pXd_leaf() is a global API which is always defined, while pXd_large() is not.

We have yet one more API that is similar which is pXd_huge(), but that's even trickier, so let's do it step by step.

Some special cares are taken for ppc and x86, they're done as separate cleanups first.

This patch (of 10):

The two definitions are the same. The only difference is that pXd_large() is only defined with THP selected, and only on book3s 64bits.

Instead of implementing it twice, make pXd_large() a macro to pXd_leaf(). Define it unconditionally just like pXd_leaf(). This helps to prepare merging the two APIs.

Cc Michael Ellerman <[email protected]>
Cc Nicholas Piggin <[email protected]>
Cc Christophe Leroy <[email protected]>
Cc "Aneesh Kumar K.V" <[email protected]>
Cc "Naveen N. Rao" <[email protected]>
Cc Kirill A. Shutemov <[email protected]>
Cc Muchun Song <[email protected]>
Cc Yang Shi <[email protected]>
Cc Alexander Potapenko <[email protected]>
Cc Andrey Konovalov <[email protected]>
Cc Andrey Ryabinin <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Dave Hansen <[email protected]>
Cc Dmitry Vyukov <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Vincenzo Frascino <[email protected]>

---

 arch/powerpc/include/asm/book3s/64/pgtable.h |   16 ++--------------
 arch/powerpc/include/asm/pgtable.h           |    2 +-
 2 files changed, 3 insertions(+), 15 deletions(-)
arch/powerpc/include/asm/book3s/64/pgtable.h renamed from arch/powerpc/include/asm/book3s/64/pgtable.h~mm-ppc-define-pxd_large-with-pxd_leaf +2 -14
@@ -1158,20 +1158,6 @@ pud_hugepage_update(struct mm_struct *mm
 }
 
 /*
- * returns true for pmd migration entries, THP, devmap, hugetlb
- * But compile time dependent on THP config
- */
-static inline int pmd_large(pmd_t pmd)
-{
-	return !!(pmd_raw(pmd) & cpu_to_be64(_PAGE_PTE));
-}
-
-static inline int pud_large(pud_t pud)
-{
-	return !!(pud_raw(pud) & cpu_to_be64(_PAGE_PTE));
-}
-
-/*
  * For radix we should always find H_PAGE_HASHPTE zero. Hence
  * the below will work for radix too
  */
@@ -1455,6 +1441,7 @@ static inline bool is_pte_rw_upgrade(uns
  */
 #define pmd_is_leaf pmd_is_leaf
 #define pmd_leaf pmd_is_leaf
+#define pmd_large pmd_leaf
 static inline bool pmd_is_leaf(pmd_t pmd)
 {
 	return !!(pmd_raw(pmd) & cpu_to_be64(_PAGE_PTE));
@@ -1462,6 +1449,7 @@ static inline bool pmd_is_leaf(pmd_t pmd
 
 #define pud_is_leaf pud_is_leaf
 #define pud_leaf pud_is_leaf
+#define pud_large pud_leaf
 static inline bool pud_is_leaf(pud_t pud)
 {
 	return !!(pud_raw(pud) & cpu_to_be64(_PAGE_PTE));
arch/powerpc/include/asm/pgtable.h renamed from arch/powerpc/include/asm/pgtable.h~mm-ppc-define-pxd_large-with-pxd_leaf +1 -1
@@ -101,7 +101,7 @@ void poking_init(void);
 extern unsigned long ioremap_bot;
 extern const pgprot_t protection_map[16];
 
-#ifndef CONFIG_TRANSPARENT_HUGEPAGE
+#ifndef pmd_large
 #define pmd_large(pmd)		0
 #endif
 

_

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