1 #ifndef _ASM_X86_PGTABLE_3LEVEL_DEFS_H 2 #define _ASM_X86_PGTABLE_3LEVEL_DEFS_H 3 4 #ifndef __ASSEMBLY__ 5 #include <linux/types.h> 6 7 typedef u64 pteval_t; 8 typedef u64 pmdval_t; 9 typedef u64 pudval_t; 10 typedef u64 p4dval_t; 11 typedef u64 pgdval_t; 12 typedef u64 pgprotval_t; 13 14 typedef union { 15 struct { 16 unsigned long pte_low, pte_high; 17 }; 18 pteval_t pte; 19 } pte_t; 20 #endif /* !__ASSEMBLY__ */ 21 22 #ifdef CONFIG_PARAVIRT 23 #define SHARED_KERNEL_PMD (pv_info.shared_kernel_pmd) 24 #else 25 #define SHARED_KERNEL_PMD 1 26 #endif 27 28 /* 29 * PGDIR_SHIFT determines what a top-level page table entry can map 30 */ 31 #define PGDIR_SHIFT 30 32 #define PTRS_PER_PGD 4 33 34 /* 35 * PMD_SHIFT determines the size of the area a middle-level 36 * page table can map 37 */ 38 #define PMD_SHIFT 21 39 #define PTRS_PER_PMD 512 40 41 /* 42 * entries per page directory level 43 */ 44 #define PTRS_PER_PTE 512 45 46 47 #endif /* _ASM_X86_PGTABLE_3LEVEL_DEFS_H */ 48