Skip to content

Commit 83ea65d

Browse files
xzpeterakpm00
authored andcommitted
mm/x86: replace pgd_large() with pgd_leaf()
pgd_leaf() is a global API while pgd_large() is not. Always use the global pgd_leaf(), then drop pgd_large(). Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Peter Xu <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Mike Rapoport (IBM) <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Alexander Potapenko <[email protected]> Cc: Andrey Konovalov <[email protected]> Cc: Andrey Ryabinin <[email protected]> Cc: "Aneesh Kumar K.V" <[email protected]> Cc: Christophe Leroy <[email protected]> Cc: Dmitry Vyukov <[email protected]> Cc: Kirill A. Shutemov <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Muchun Song <[email protected]> Cc: "Naveen N. Rao" <[email protected]> Cc: Nicholas Piggin <[email protected]> Cc: Vincenzo Frascino <[email protected]> Cc: Yang Shi <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent dba8e6f commit 83ea65d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

arch/x86/include/asm/pgtable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,8 +1418,8 @@ static inline bool pgdp_maps_userspace(void *__ptr)
14181418
return (((ptr & ~PAGE_MASK) / sizeof(pgd_t)) < PGD_KERNEL_START);
14191419
}
14201420

1421-
#define pgd_leaf pgd_large
1422-
static inline int pgd_large(pgd_t pgd) { return 0; }
1421+
#define pgd_leaf pgd_leaf
1422+
static inline int pgd_leaf(pgd_t pgd) { return 0; }
14231423

14241424
#ifdef CONFIG_PAGE_TABLE_ISOLATION
14251425
/*

arch/x86/mm/pti.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ static p4d_t *pti_user_pagetable_walk_p4d(unsigned long address)
185185

186186
set_pgd(pgd, __pgd(_KERNPG_TABLE | __pa(new_p4d_page)));
187187
}
188-
BUILD_BUG_ON(pgd_large(*pgd) != 0);
188+
BUILD_BUG_ON(pgd_leaf(*pgd) != 0);
189189

190190
return p4d_offset(pgd, address);
191191
}

0 commit comments

Comments
 (0)