aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/init_64.c
diff options
context:
space:
mode:
authorPekka Enberg <penberg@cs.helsinki.fi>2009-03-05 07:54:56 -0500
committerIngo Molnar <mingo@elte.hu>2009-03-05 08:17:12 -0500
commit54e63f3a4282a8bc5b39db29095f076ece2b1073 (patch)
tree105ebabc730cfeed7f27c3de5793d8d809501e90 /arch/x86/mm/init_64.c
parente7179853e7552ba6631e2cdd9f5c374383403b4b (diff)
x86: ifdef 32-bit specific setup in init_memory_mapping()
Impact: cleanup Enabling NX, PSE, and PGE are only required on 32-bit so ifdef them in both versions of the function. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Yinghai Lu <yinghai@kernel.org> LKML-Reference: <1236257708-27269-5-git-send-email-penberg@cs.helsinki.fi> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/init_64.c')
-rw-r--r--arch/x86/mm/init_64.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index 151e5ba34412..c3c0be5b6373 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -712,6 +712,24 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
712 use_gbpages = direct_gbpages; 712 use_gbpages = direct_gbpages;
713#endif 713#endif
714 714
715#ifdef CONFIG_X86_32
716#ifdef CONFIG_X86_PAE
717 set_nx();
718 if (nx_enabled)
719 printk(KERN_INFO "NX (Execute Disable) protection: active\n");
720#endif
721
722 /* Enable PSE if available */
723 if (cpu_has_pse)
724 set_in_cr4(X86_CR4_PSE);
725
726 /* Enable PGE if available */
727 if (cpu_has_pge) {
728 set_in_cr4(X86_CR4_PGE);
729 __supported_pte_mask |= _PAGE_GLOBAL;
730 }
731#endif
732
715 if (use_gbpages) 733 if (use_gbpages)
716 page_size_mask |= 1 << PG_LEVEL_1G; 734 page_size_mask |= 1 << PG_LEVEL_1G;
717 if (use_pse) 735 if (use_pse)