aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/init_32.c
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-07-01 19:46:36 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-08 07:16:29 -0400
commitef5e94af16c0c82452e1ea5d387e1203dd2198d6 (patch)
tree7d80d1bba8a0c58e91995ead6f8b2cd6eddd314e /arch/x86/mm/init_32.c
parent8490638cf0fb3975f7636c5268f27d5daf4eaaa5 (diff)
x86_32: remove __PAGE_KERNEL(_EXEC)
From: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Older x86-32 processors do not support global mappings (PGD), so must only use it if the processor supports it. The _PAGE_KERNEL* flags always have _PAGE_KERNEL set, since logically we always want it set. This is OK even on processors which do not support PGD, since all _PAGE flags are masked with __supported_pte_mask before being turned into a real in-pagetable pte. On 32-bit systems, __supported_pte_mask is initialized to not contain _PAGE_GLOBAL, and it is then added if the CPU is found to support it. The x86-32 code used to use __PAGE_KERNEL/__PAGE_KERNEL_EXEC for this purpose, but they're now redundant and can be removed. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Cc: Stephen Tweedie <sct@redhat.com> Cc: Eduardo Habkost <ehabkost@redhat.com> Cc: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/init_32.c')
-rw-r--r--arch/x86/mm/init_32.c10
1 files changed, 2 insertions, 8 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
386pteval_t __PAGE_KERNEL = _PAGE_KERNEL;
387EXPORT_SYMBOL(__PAGE_KERNEL);
388
389pteval_t __PAGE_KERNEL_EXEC = _PAGE_KERNEL_EXEC;
390
391void __init native_pagetable_setup_start(pgd_t *base) 386void __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
510int nx_enabled; 505int nx_enabled;
511 506
512pteval_t __supported_pte_mask __read_mostly = ~_PAGE_NX; 507pteval_t __supported_pte_mask __read_mostly = ~(_PAGE_NX | _PAGE_GLOBAL);
513EXPORT_SYMBOL_GPL(__supported_pte_mask); 508EXPORT_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 /*