aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/head_64.S4
-rw-r--r--include/asm-x86/pgtable.h32
2 files changed, 15 insertions, 21 deletions
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
index 4336f98456ea..b07ac7b217cb 100644
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -374,7 +374,7 @@ NEXT_PAGE(level2_ident_pgt)
374 /* Since I easily can, map the first 1G. 374 /* Since I easily can, map the first 1G.
375 * Don't set NX because code runs from these pages. 375 * Don't set NX because code runs from these pages.
376 */ 376 */
377 PMDS(0, __PAGE_KERNEL_LARGE_EXEC | _PAGE_GLOBAL, PTRS_PER_PMD) 377 PMDS(0, __PAGE_KERNEL_LARGE_EXEC, PTRS_PER_PMD)
378 378
379NEXT_PAGE(level2_kernel_pgt) 379NEXT_PAGE(level2_kernel_pgt)
380 /* 380 /*
@@ -387,7 +387,7 @@ NEXT_PAGE(level2_kernel_pgt)
387 * If you want to increase this then increase MODULES_VADDR 387 * If you want to increase this then increase MODULES_VADDR
388 * too.) 388 * too.)
389 */ 389 */
390 PMDS(0, __PAGE_KERNEL_LARGE_EXEC|_PAGE_GLOBAL, 390 PMDS(0, __PAGE_KERNEL_LARGE_EXEC,
391 KERNEL_IMAGE_SIZE/PMD_SIZE) 391 KERNEL_IMAGE_SIZE/PMD_SIZE)
392 392
393NEXT_PAGE(level2_spare_pgt) 393NEXT_PAGE(level2_spare_pgt)
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h
index 85f851a0b998..a1c0009e81b7 100644
--- a/include/asm-x86/pgtable.h
+++ b/include/asm-x86/pgtable.h
@@ -88,7 +88,7 @@ extern pteval_t __PAGE_KERNEL, __PAGE_KERNEL_EXEC;
88#endif /* __ASSEMBLY__ */ 88#endif /* __ASSEMBLY__ */
89#else 89#else
90#define __PAGE_KERNEL_EXEC \ 90#define __PAGE_KERNEL_EXEC \
91 (_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED) 91 (_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_GLOBAL)
92#define __PAGE_KERNEL (__PAGE_KERNEL_EXEC | _PAGE_NX) 92#define __PAGE_KERNEL (__PAGE_KERNEL_EXEC | _PAGE_NX)
93#endif 93#endif
94 94
@@ -103,24 +103,18 @@ extern pteval_t __PAGE_KERNEL, __PAGE_KERNEL_EXEC;
103#define __PAGE_KERNEL_LARGE (__PAGE_KERNEL | _PAGE_PSE) 103#define __PAGE_KERNEL_LARGE (__PAGE_KERNEL | _PAGE_PSE)
104#define __PAGE_KERNEL_LARGE_EXEC (__PAGE_KERNEL_EXEC | _PAGE_PSE) 104#define __PAGE_KERNEL_LARGE_EXEC (__PAGE_KERNEL_EXEC | _PAGE_PSE)
105 105
106#ifdef CONFIG_X86_32 106#define PAGE_KERNEL __pgprot(__PAGE_KERNEL)
107# define MAKE_GLOBAL(x) __pgprot((x)) 107#define PAGE_KERNEL_RO __pgprot(__PAGE_KERNEL_RO)
108#else 108#define PAGE_KERNEL_EXEC __pgprot(__PAGE_KERNEL_EXEC)
109# define MAKE_GLOBAL(x) __pgprot((x) | _PAGE_GLOBAL) 109#define PAGE_KERNEL_RX __pgprot(__PAGE_KERNEL_RX)
110#endif 110#define PAGE_KERNEL_WC __pgprot(__PAGE_KERNEL_WC)
111 111#define PAGE_KERNEL_NOCACHE __pgprot(__PAGE_KERNEL_NOCACHE)
112#define PAGE_KERNEL MAKE_GLOBAL(__PAGE_KERNEL) 112#define PAGE_KERNEL_UC_MINUS __pgprot(__PAGE_KERNEL_UC_MINUS)
113#define PAGE_KERNEL_RO MAKE_GLOBAL(__PAGE_KERNEL_RO) 113#define PAGE_KERNEL_EXEC_NOCACHE __pgprot(__PAGE_KERNEL_EXEC_NOCACHE)
114#define PAGE_KERNEL_EXEC MAKE_GLOBAL(__PAGE_KERNEL_EXEC) 114#define PAGE_KERNEL_LARGE __pgprot(__PAGE_KERNEL_LARGE)
115#define PAGE_KERNEL_RX MAKE_GLOBAL(__PAGE_KERNEL_RX) 115#define PAGE_KERNEL_LARGE_EXEC __pgprot(__PAGE_KERNEL_LARGE_EXEC)
116#define PAGE_KERNEL_WC MAKE_GLOBAL(__PAGE_KERNEL_WC) 116#define PAGE_KERNEL_VSYSCALL __pgprot(__PAGE_KERNEL_VSYSCALL)
117#define PAGE_KERNEL_NOCACHE MAKE_GLOBAL(__PAGE_KERNEL_NOCACHE) 117#define PAGE_KERNEL_VSYSCALL_NOCACHE __pgprot(__PAGE_KERNEL_VSYSCALL_NOCACHE)
118#define PAGE_KERNEL_UC_MINUS MAKE_GLOBAL(__PAGE_KERNEL_UC_MINUS)
119#define PAGE_KERNEL_EXEC_NOCACHE MAKE_GLOBAL(__PAGE_KERNEL_EXEC_NOCACHE)
120#define PAGE_KERNEL_LARGE MAKE_GLOBAL(__PAGE_KERNEL_LARGE)
121#define PAGE_KERNEL_LARGE_EXEC MAKE_GLOBAL(__PAGE_KERNEL_LARGE_EXEC)
122#define PAGE_KERNEL_VSYSCALL MAKE_GLOBAL(__PAGE_KERNEL_VSYSCALL)
123#define PAGE_KERNEL_VSYSCALL_NOCACHE MAKE_GLOBAL(__PAGE_KERNEL_VSYSCALL_NOCACHE)
124 118
125/* xwr */ 119/* xwr */
126#define __P000 PAGE_NONE 120#define __P000 PAGE_NONE