public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
* [PATCH] mm_types: remove references to s390 gmap
@ 2026-04-27 10:58 Paolo Bonzini
  2026-04-27 11:39 ` David Hildenbrand (Arm)
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Paolo Bonzini @ 2026-04-27 10:58 UTC (permalink / raw)
  To: linux-kernel, kvm
  Cc: linux-mm, linux-m68k, David Hildenbrand (Arm), Geert Uytterhoeven

s390 does not anymore use special struct page for its shadow page tables.
The honor of giving a special meaning to pt_index is now m68k's, so
rename the fields and adjust them for the desired type.

Cc: linux-mm@kvack.org
Cc: linux-m68k@lists.linux-m68k.org
Cc: David Hildenbrand (Arm) <david@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
	Compile-tested only.

 arch/m68k/mm/motorola.c  |  2 +-
 include/linux/mm_types.h | 11 +++++------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/arch/m68k/mm/motorola.c b/arch/m68k/mm/motorola.c
index b30aa69a73a6..67e8a2cf4c41 100644
--- a/arch/m68k/mm/motorola.c
+++ b/arch/m68k/mm/motorola.c
@@ -105,7 +105,7 @@ static struct list_head ptable_list[3] = {
 
 #define PD_PTABLE(ptdesc) ((ptable_desc *)&(virt_to_ptdesc((void *)(ptdesc))->pt_list))
 #define PD_PTDESC(ptable) (list_entry(ptable, struct ptdesc, pt_list))
-#define PD_MARKBITS(dp) (*(unsigned int *)&PD_PTDESC(dp)->pt_index)
+#define PD_MARKBITS(dp)   (PD_PTDESC(dp)->pt_markbits)
 
 static const int ptable_shift[3] = {
 	7+2, /* PGD */
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index a308e2c23b82..9e4dbcddaf33 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -550,13 +550,12 @@ FOLIO_MATCH(compound_info, _head_3);
  * struct ptdesc -    Memory descriptor for page tables.
  * @pt_flags: enum pt_flags plus zone/node/section.
  * @pt_rcu_head:      For freeing page table pages.
- * @pt_list:          List of used page tables. Used for s390 gmap shadow pages
- *                    (which are not linked into the user page tables) and x86
- *                    pgds.
+ * @pt_list:          List of used page tables. Used by m68k pointer tables
+ *                    and x86 pgds.
  * @_pt_pad_1:        Padding that aliases with page's compound head.
  * @pmd_huge_pte:     Protected by ptdesc->ptl, used for THPs.
  * @__page_mapping:   Aliases with page->mapping. Unused for page tables.
- * @pt_index:         Used for s390 gmap.
+ * @pt_markbits:      Used for m68k pointer tables.
  * @pt_mm:            Used for x86 pgds.
  * @pt_frag_refcount: For fragmented page table tracking. Powerpc only.
  * @pt_share_count:   Used for HugeTLB PMD page table share count.
@@ -583,7 +582,7 @@ struct ptdesc {
 	unsigned long __page_mapping;
 
 	union {
-		pgoff_t pt_index;
+		unsigned int pt_markbits;
 		struct mm_struct *pt_mm;
 		atomic_t pt_frag_refcount;
 #ifdef CONFIG_HUGETLB_PMD_PAGE_TABLE_SHARING
@@ -612,7 +611,7 @@ TABLE_MATCH(flags, pt_flags);
 TABLE_MATCH(compound_info, pt_list);
 TABLE_MATCH(compound_info, _pt_pad_1);
 TABLE_MATCH(mapping, __page_mapping);
-TABLE_MATCH(__folio_index, pt_index);
+TABLE_MATCH(__folio_index, pt_markbits);
 TABLE_MATCH(rcu_head, pt_rcu_head);
 TABLE_MATCH(page_type, __page_type);
 TABLE_MATCH(_refcount, __page_refcount);
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-04-28  9:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-27 10:58 [PATCH] mm_types: remove references to s390 gmap Paolo Bonzini
2026-04-27 11:39 ` David Hildenbrand (Arm)
2026-04-27 21:44 ` Vishal Moola
2026-04-28  6:58 ` Geert Uytterhoeven
2026-04-28  9:39   ` Paolo Bonzini
2026-04-28  9:43     ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox