Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86: Split pgtable_64.h into pgtable_64_types.h and pgtable_64.h

Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>

authored by

Jeremy Fitzhardinge and committed by
Jeremy Fitzhardinge
fb355149 f402a65f

+48 -46
+2 -46
arch/x86/include/asm/pgtable_64.h
··· 2 2 #define _ASM_X86_PGTABLE_64_H 3 3 4 4 #include <linux/const.h> 5 + #include <asm/pgtable_64_types.h> 6 + 5 7 #ifndef __ASSEMBLY__ 6 8 7 9 /* ··· 26 24 extern void paging_init(void); 27 25 28 26 #endif /* !__ASSEMBLY__ */ 29 - 30 - #define SHARED_KERNEL_PMD 0 31 - 32 - /* 33 - * PGDIR_SHIFT determines what a top-level page table entry can map 34 - */ 35 - #define PGDIR_SHIFT 39 36 - #define PTRS_PER_PGD 512 37 - 38 - /* 39 - * 3rd level page 40 - */ 41 - #define PUD_SHIFT 30 42 - #define PTRS_PER_PUD 512 43 - 44 - /* 45 - * PMD_SHIFT determines the size of the area a middle-level 46 - * page table can map 47 - */ 48 - #define PMD_SHIFT 21 49 - #define PTRS_PER_PMD 512 50 - 51 - /* 52 - * entries per page directory level 53 - */ 54 - #define PTRS_PER_PTE 512 55 27 56 28 #ifndef __ASSEMBLY__ 57 29 ··· 105 129 { 106 130 native_set_pgd(pgd, native_make_pgd(0)); 107 131 } 108 - 109 - #endif /* !__ASSEMBLY__ */ 110 - 111 - #define PMD_SIZE (_AC(1, UL) << PMD_SHIFT) 112 - #define PMD_MASK (~(PMD_SIZE - 1)) 113 - #define PUD_SIZE (_AC(1, UL) << PUD_SHIFT) 114 - #define PUD_MASK (~(PUD_SIZE - 1)) 115 - #define PGDIR_SIZE (_AC(1, UL) << PGDIR_SHIFT) 116 - #define PGDIR_MASK (~(PGDIR_SIZE - 1)) 117 - 118 - 119 - #define MAXMEM _AC(__AC(1, UL) << MAX_PHYSMEM_BITS, UL) 120 - #define VMALLOC_START _AC(0xffffc20000000000, UL) 121 - #define VMALLOC_END _AC(0xffffe1ffffffffff, UL) 122 - #define VMEMMAP_START _AC(0xffffe20000000000, UL) 123 - #define MODULES_VADDR _AC(0xffffffffa0000000, UL) 124 - #define MODULES_END _AC(0xffffffffff000000, UL) 125 - #define MODULES_LEN (MODULES_END - MODULES_VADDR) 126 - 127 - #ifndef __ASSEMBLY__ 128 132 129 133 /* 130 134 * Conversion functions: convert a page and protection to a page entry,
+46
arch/x86/include/asm/pgtable_64_types.h
··· 1 + #ifndef _ASM_X86_PGTABLE_64_DEFS_H 2 + #define _ASM_X86_PGTABLE_64_DEFS_H 3 + 4 + #define SHARED_KERNEL_PMD 0 5 + 6 + /* 7 + * PGDIR_SHIFT determines what a top-level page table entry can map 8 + */ 9 + #define PGDIR_SHIFT 39 10 + #define PTRS_PER_PGD 512 11 + 12 + /* 13 + * 3rd level page 14 + */ 15 + #define PUD_SHIFT 30 16 + #define PTRS_PER_PUD 512 17 + 18 + /* 19 + * PMD_SHIFT determines the size of the area a middle-level 20 + * page table can map 21 + */ 22 + #define PMD_SHIFT 21 23 + #define PTRS_PER_PMD 512 24 + 25 + /* 26 + * entries per page directory level 27 + */ 28 + #define PTRS_PER_PTE 512 29 + 30 + #define PMD_SIZE (_AC(1, UL) << PMD_SHIFT) 31 + #define PMD_MASK (~(PMD_SIZE - 1)) 32 + #define PUD_SIZE (_AC(1, UL) << PUD_SHIFT) 33 + #define PUD_MASK (~(PUD_SIZE - 1)) 34 + #define PGDIR_SIZE (_AC(1, UL) << PGDIR_SHIFT) 35 + #define PGDIR_MASK (~(PGDIR_SIZE - 1)) 36 + 37 + 38 + #define MAXMEM _AC(__AC(1, UL) << MAX_PHYSMEM_BITS, UL) 39 + #define VMALLOC_START _AC(0xffffc20000000000, UL) 40 + #define VMALLOC_END _AC(0xffffe1ffffffffff, UL) 41 + #define VMEMMAP_START _AC(0xffffe20000000000, UL) 42 + #define MODULES_VADDR _AC(0xffffffffa0000000, UL) 43 + #define MODULES_END _AC(0xffffffffff000000, UL) 44 + #define MODULES_LEN (MODULES_END - MODULES_VADDR) 45 + 46 + #endif /* _ASM_X86_PGTABLE_64_DEFS_H */