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) Cc: Geert Uytterhoeven Signed-off-by: Paolo Bonzini --- 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