arch/m68k/mm/motorola.c | 2 +- include/linux/mm_types.h | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-)
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
On Mon, 27 Apr 2026 at 12:58, Paolo Bonzini <pbonzini@redhat.com> wrote:
> 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>
> arch/m68k/mm/motorola.c | 2 +-
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> # m68k
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
On Tue, Apr 28, 2026 at 8:58 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > > On Mon, 27 Apr 2026 at 12:58, Paolo Bonzini <pbonzini@redhat.com> wrote: > > 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> > > > arch/m68k/mm/motorola.c | 2 +- > > Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> # m68k Thanks, do you expect it to go through the mm tree or are you taking it yourself? Paolo
Hi Paolo,
On Tue, 28 Apr 2026 at 11:40, Paolo Bonzini <pbonzini@redhat.com> wrote:
> On Tue, Apr 28, 2026 at 8:58 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Mon, 27 Apr 2026 at 12:58, Paolo Bonzini <pbonzini@redhat.com> wrote:
> > > 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>
> >
> > > arch/m68k/mm/motorola.c | 2 +-
> >
> > Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> # m68k
>
> Thanks, do you expect it to go through the mm tree or are you taking
> it yourself?
I assumed the mm tree.
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
On Mon, Apr 27, 2026 at 12:58:10PM +0200, Paolo Bonzini wrote: > 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> > --- Acked-by: Vishal Moola <vishal.moola@gmail.com>
On 4/27/26 12:58, Paolo Bonzini wrote: > 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> > --- Acked-by: David Hildenbrand (Arm) <david@kernel.org> -- Cheers, David
© 2016 - 2026 Red Hat, Inc.