| 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | #ifndef _ASM_X86_PGTABLE_2LEVEL_DEFS_H |
| 3 | #define _ASM_X86_PGTABLE_2LEVEL_DEFS_H |
| 4 | |
| 5 | #ifndef __ASSEMBLER__ |
| 6 | #include <linux/types.h> |
| 7 | |
| 8 | typedef unsigned long pteval_t; |
| 9 | typedef unsigned long pmdval_t; |
| 10 | typedef unsigned long pudval_t; |
| 11 | typedef unsigned long p4dval_t; |
| 12 | typedef unsigned long pgdval_t; |
| 13 | typedef unsigned long pgprotval_t; |
| 14 | |
| 15 | typedef union { |
| 16 | pteval_t pte; |
| 17 | pteval_t pte_low; |
| 18 | } pte_t; |
| 19 | #endif /* !__ASSEMBLER__ */ |
| 20 | |
| 21 | #define ARCH_PAGE_TABLE_SYNC_MASK PGTBL_PMD_MODIFIED |
| 22 | |
| 23 | /* |
| 24 | * Traditional i386 two-level paging structure: |
| 25 | */ |
| 26 | |
| 27 | #define PGDIR_SHIFT 22 |
| 28 | #define PTRS_PER_PGD 1024 |
| 29 | |
| 30 | /* |
| 31 | * The i386 is two-level, so we don't really have any |
| 32 | * PMD directory physically: |
| 33 | */ |
| 34 | #define PTRS_PER_PMD 1 |
| 35 | |
| 36 | #define PTRS_PER_PTE 1024 |
| 37 | |
| 38 | /* This covers all VMSPLIT_* and VMSPLIT_*_OPT variants */ |
| 39 | #define PGD_KERNEL_START (CONFIG_PAGE_OFFSET >> PGDIR_SHIFT) |
| 40 | |
| 41 | #endif /* _ASM_X86_PGTABLE_2LEVEL_DEFS_H */ |
| 42 | |