mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-01 10:42:11 +00:00
mm: Introduce pXX_leaf_size()
A number of architectures have non-pagetable aligned huge/large pages. For such architectures a leaf can actually be part of a larger entry. Provide generic helpers to determine the size of a page-table leaf. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org> Link: https://lkml.kernel.org/r/20201126121121.102580109@infradead.org
This commit is contained in:
parent
2a4a06da8a
commit
560dabbdf6
@ -1536,4 +1536,20 @@ typedef unsigned int pgtbl_mod_mask;
|
||||
#define pmd_leaf(x) 0
|
||||
#endif
|
||||
|
||||
#ifndef pgd_leaf_size
|
||||
#define pgd_leaf_size(x) (1ULL << PGDIR_SHIFT)
|
||||
#endif
|
||||
#ifndef p4d_leaf_size
|
||||
#define p4d_leaf_size(x) P4D_SIZE
|
||||
#endif
|
||||
#ifndef pud_leaf_size
|
||||
#define pud_leaf_size(x) PUD_SIZE
|
||||
#endif
|
||||
#ifndef pmd_leaf_size
|
||||
#define pmd_leaf_size(x) PMD_SIZE
|
||||
#endif
|
||||
#ifndef pte_leaf_size
|
||||
#define pte_leaf_size(x) PAGE_SIZE
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_PGTABLE_H */
|
||||
|
Loading…
Reference in New Issue
Block a user