Skip to contentSkip to conversation

mm-add-utility-functions-for-ptdesc.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Aug 21, 2023

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: add utility functions for ptdesc
has been removed from the -mm tree. Its filename was
mm-add-utility-functions-for-ptdesc.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: "Vishal Moola (Oracle)" <[email protected]>
Subject: mm: add utility functions for ptdesc
Date: Mon, 7 Aug 2023 16:04:45 -0700

Introduce utility functions setting the foundation for ptdescs. These will also assist in the splitting out of ptdesc from struct page.

Functions that focus on the descriptor are prefixed with ptdesc_* while functions that focus on the pagetable are prefixed with pagetable_*.

pagetable_alloc() is defined to allocate new ptdesc pages as compound pages. This is to standardize ptdescs by allowing for one allocation and one free function, in contrast to 2 allocation and 2 free functions.

Cc Arnd Bergmann <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Christophe Leroy <[email protected]>
Cc Claudio Imbrenda <[email protected]>
Cc Dave Hansen <[email protected]>
Cc David Hildenbrand <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Guo Ren <[email protected]>
Cc Huacai Chen <[email protected]>
Cc Hugh Dickins <[email protected]>
Cc John Paul Adrian Glaubitz <[email protected]>
Cc Jonas Bonn <[email protected]>
Cc Matthew Wilcox <[email protected]>
Cc Mike Rapoport (IBM) <[email protected]>
Cc Palmer Dabbelt <[email protected]>
Cc Paul Walmsley <[email protected]>
Cc Richard Weinberger <[email protected]>
Cc Thomas Bogendoerfer <[email protected]>
Cc Yoshinori Sato <[email protected]>

---

 include/asm-generic/tlb.h |   11 ++++++
 include/linux/mm.h        |   61 ++++++++++++++++++++++++++++++++++++
 include/linux/mm_types.h  |   12 +++++++
 3 files changed, 84 insertions(+)
include/asm-generic/tlb.h renamed from include/asm-generic/tlb.h~mm-add-utility-functions-for-ptdesc +11 -0
@@ -480,6 +480,17 @@ static inline void tlb_remove_page(struc
 	return tlb_remove_page_size(tlb, page, PAGE_SIZE);
 }
 
+static inline void tlb_remove_ptdesc(struct mmu_gather *tlb, void *pt)
+{
+	tlb_remove_table(tlb, pt);
+}
+
+/* Like tlb_remove_ptdesc, but for page-like page directories. */
+static inline void tlb_remove_page_ptdesc(struct mmu_gather *tlb, struct ptdesc *pt)
+{
+	tlb_remove_page(tlb, ptdesc_page(pt));
+}
+
 static inline void tlb_change_page_size(struct mmu_gather *tlb,
 						     unsigned int page_size)
 {
include/linux/mm.h renamed from include/linux/mm.h~mm-add-utility-functions-for-ptdesc +61 -0

79 lines not on this page · raw message

include/linux/mm_types.h renamed from include/linux/mm_types.h~mm-add-utility-functions-for-ptdesc +12 -0
@@ -467,6 +467,18 @@ TABLE_MATCH(memcg_data, pt_memcg_data);
 #undef TABLE_MATCH
 static_assert(sizeof(struct ptdesc) <= sizeof(struct page));
 
+#define ptdesc_page(pt)			(_Generic((pt),			\
+	const struct ptdesc *:		(const struct page *)(pt),	\
+	struct ptdesc *:		(struct page *)(pt)))
+
+#define ptdesc_folio(pt)		(_Generic((pt),			\
+	const struct ptdesc *:		(const struct folio *)(pt),	\
+	struct ptdesc *:		(struct folio *)(pt)))
+
+#define page_ptdesc(p)			(_Generic((p),			\
+	const struct page *:		(const struct ptdesc *)(p),	\
+	struct page *:			(struct ptdesc *)(p)))
+
 /*
  * Used for sizing the vmemmap region on some architectures
  */

_

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