Skip to contentSkip to conversation

mm-move-pd_alloc_track-to-separate-header-file.patch removed from -mm tree

merged [email protected] 1 participant 1 message Aug 10, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: mm: move p?d_alloc_track to separate header file
has been removed from the -mm tree. Its filename was
mm-move-pd_alloc_track-to-separate-header-file.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Joerg Roedel <[email protected]>
Subject: mm: move p?d_alloc_track to separate header file

The functions are only used in two source files, so there is no need for them to be in the global <linux/mm.h> header. Move them to the new <linux/pgalloc-track.h> header and include it only where needed.

Cc Peter Zijlstra (Intel) <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc Abdul Haleem <[email protected]>
Cc Satheesh Rajendran <[email protected]>
Cc Stephen Rothwell <[email protected]>
Cc Steven Rostedt (VMware) <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Christophe Leroy <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Max Filippov <[email protected]>
Cc Stafford Horne <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Matthew Wilcox <[email protected]>

---

 include/linux/mm.h |   45 -------------------------------------
 mm/ioremap.c       |    2 +
 mm/pgalloc-track.h |   51 +++++++++++++++++++++++++++++++++++++++++++
 mm/vmalloc.c       |    1 
 4 files changed, 54 insertions(+), 45 deletions(-)
include/linux/mm.h renamed from include/linux/mm.h~mm-move-pd_alloc_track-to-separate-header-file +0 -45
@@ -2103,51 +2103,11 @@ static inline pud_t *pud_alloc(struct mm
 		NULL : pud_offset(p4d, address);
 }
 
-static inline p4d_t *p4d_alloc_track(struct mm_struct *mm, pgd_t *pgd,
-				     unsigned long address,
-				     pgtbl_mod_mask *mod_mask)
-
-{
-	if (unlikely(pgd_none(*pgd))) {
-		if (__p4d_alloc(mm, pgd, address))
-			return NULL;
-		*mod_mask |= PGTBL_PGD_MODIFIED;
-	}
-
-	return p4d_offset(pgd, address);
-}
-
-static inline pud_t *pud_alloc_track(struct mm_struct *mm, p4d_t *p4d,
-				     unsigned long address,
-				     pgtbl_mod_mask *mod_mask)
-{
-	if (unlikely(p4d_none(*p4d))) {
-		if (__pud_alloc(mm, p4d, address))
-			return NULL;
-		*mod_mask |= PGTBL_P4D_MODIFIED;
-	}
-
-	return pud_offset(p4d, address);
-}
-
 static inline pmd_t *pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
 {
 	return (unlikely(pud_none(*pud)) && __pmd_alloc(mm, pud, address))?
 		NULL: pmd_offset(pud, address);
 }
-
-static inline pmd_t *pmd_alloc_track(struct mm_struct *mm, pud_t *pud,
-				     unsigned long address,
-				     pgtbl_mod_mask *mod_mask)
-{
-	if (unlikely(pud_none(*pud))) {
-		if (__pmd_alloc(mm, pud, address))
-			return NULL;
-		*mod_mask |= PGTBL_PUD_MODIFIED;
-	}
-
-	return pmd_offset(pud, address);
-}
 #endif /* CONFIG_MMU */
 
 #if USE_SPLIT_PTE_PTLOCKS
@@ -2263,11 +2223,6 @@ static inline void pgtable_pte_page_dtor
 	((unlikely(pmd_none(*(pmd))) && __pte_alloc_kernel(pmd))? \
 		NULL: pte_offset_kernel(pmd, address))
 
-#define pte_alloc_kernel_track(pmd, address, mask)			\
-	((unlikely(pmd_none(*(pmd))) &&					\
-	  (__pte_alloc_kernel(pmd) || ({*(mask)|=PGTBL_PMD_MODIFIED;0;})))?\
-		NULL: pte_offset_kernel(pmd, address))
-
 #if USE_SPLIT_PMD_PTLOCKS
 
 static struct page *pmd_to_page(pmd_t *pmd)
mm/ioremap.c renamed from mm/ioremap.c~mm-move-pd_alloc_track-to-separate-header-file +2 -0
@@ -13,6 +13,8 @@
 #include <linux/export.h>
 #include <asm/cacheflush.h>
 
+#include "pgalloc-track.h"
+
 #ifdef CONFIG_HAVE_ARCH_HUGE_VMAP
 static int __read_mostly ioremap_p4d_capable;
 static int __read_mostly ioremap_pud_capable;
mm/pgalloc-track.h new file +51 -0

51 lines not on this page · raw message

mm/vmalloc.c renamed from mm/vmalloc.c~mm-move-pd_alloc_track-to-separate-header-file +1 -0
@@ -41,6 +41,7 @@
 #include <asm/shmparam.h>
 
 #include "internal.h"
+#include "pgalloc-track.h"
 
 bool is_vmalloc_addr(const void *x)
 {

_

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