diff options
-rw-r--r-- | arch/x86/mm/init_32.c | 10 | ||||
-rw-r--r-- | include/asm-x86/pgtable.h | 10 |
2 files changed, 2 insertions, 18 deletions
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index 8efe872b9617..b5a0fd5f4c5f 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c | |||
@@ -383,11 +383,6 @@ static void __init set_highmem_pages_init(void) | |||
383 | # define set_highmem_pages_init() do { } while (0) | 383 | # define set_highmem_pages_init() do { } while (0) |
384 | #endif /* CONFIG_HIGHMEM */ | 384 | #endif /* CONFIG_HIGHMEM */ |
385 | 385 | ||
386 | pteval_t __PAGE_KERNEL = _PAGE_KERNEL; | ||
387 | EXPORT_SYMBOL(__PAGE_KERNEL); | ||
388 | |||
389 | pteval_t __PAGE_KERNEL_EXEC = _PAGE_KERNEL_EXEC; | ||
390 | |||
391 | void __init native_pagetable_setup_start(pgd_t *base) | 386 | void __init native_pagetable_setup_start(pgd_t *base) |
392 | { | 387 | { |
393 | unsigned long pfn, va; | 388 | unsigned long pfn, va; |
@@ -509,7 +504,7 @@ void zap_low_mappings(void) | |||
509 | 504 | ||
510 | int nx_enabled; | 505 | int nx_enabled; |
511 | 506 | ||
512 | pteval_t __supported_pte_mask __read_mostly = ~_PAGE_NX; | 507 | pteval_t __supported_pte_mask __read_mostly = ~(_PAGE_NX | _PAGE_GLOBAL); |
513 | EXPORT_SYMBOL_GPL(__supported_pte_mask); | 508 | EXPORT_SYMBOL_GPL(__supported_pte_mask); |
514 | 509 | ||
515 | #ifdef CONFIG_X86_PAE | 510 | #ifdef CONFIG_X86_PAE |
@@ -796,8 +791,7 @@ unsigned long __init_refok init_memory_mapping(unsigned long start, | |||
796 | /* Enable PGE if available */ | 791 | /* Enable PGE if available */ |
797 | if (cpu_has_pge) { | 792 | if (cpu_has_pge) { |
798 | set_in_cr4(X86_CR4_PGE); | 793 | set_in_cr4(X86_CR4_PGE); |
799 | __PAGE_KERNEL |= _PAGE_GLOBAL; | 794 | __supported_pte_mask |= _PAGE_GLOBAL; |
800 | __PAGE_KERNEL_EXEC |= _PAGE_GLOBAL; | ||
801 | } | 795 | } |
802 | 796 | ||
803 | /* | 797 | /* |
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h index a1c0009e81b7..64de07e25329 100644 --- a/include/asm-x86/pgtable.h +++ b/include/asm-x86/pgtable.h | |||
@@ -78,19 +78,9 @@ | |||
78 | #define PAGE_READONLY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | \ | 78 | #define PAGE_READONLY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | \ |
79 | _PAGE_ACCESSED) | 79 | _PAGE_ACCESSED) |
80 | 80 | ||
81 | #ifdef CONFIG_X86_32 | ||
82 | #define _PAGE_KERNEL_EXEC \ | ||
83 | (_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED) | ||
84 | #define _PAGE_KERNEL (_PAGE_KERNEL_EXEC | _PAGE_NX) | ||
85 | |||
86 | #ifndef __ASSEMBLY__ | ||
87 | extern pteval_t __PAGE_KERNEL, __PAGE_KERNEL_EXEC; | ||
88 | #endif /* __ASSEMBLY__ */ | ||
89 | #else | ||
90 | #define __PAGE_KERNEL_EXEC \ | 81 | #define __PAGE_KERNEL_EXEC \ |
91 | (_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_GLOBAL) | 82 | (_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_GLOBAL) |
92 | #define __PAGE_KERNEL (__PAGE_KERNEL_EXEC | _PAGE_NX) | 83 | #define __PAGE_KERNEL (__PAGE_KERNEL_EXEC | _PAGE_NX) |
93 | #endif | ||
94 | 84 | ||
95 | #define __PAGE_KERNEL_RO (__PAGE_KERNEL & ~_PAGE_RW) | 85 | #define __PAGE_KERNEL_RO (__PAGE_KERNEL & ~_PAGE_RW) |
96 | #define __PAGE_KERNEL_RX (__PAGE_KERNEL_EXEC & ~_PAGE_RW) | 86 | #define __PAGE_KERNEL_RX (__PAGE_KERNEL_EXEC & ~_PAGE_RW) |