Skip to contentSkip to conversation

x86: init_memory_mapping() PSE and PGE setup ifdef removal

PATCH In review Pekka Enberg 1 participant 2 messages Mar 5, 2009 – Mar 6, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: init_memory_mapping() PSE and PGE setup ifdef removal

From: Pekka Enberg <[email protected]>

Impact: cleanup

Section 3.10 ("PAE-Enabled Paging in IA-32e Mode") of the Intel manual states that The CR4.PSE bit is ignored in IA-32e mode. In 64-bit mode, PGE is enabled at early boot so there's no need to hide setting them up in an ifdef.

---
 arch/x86/mm/init.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
arch/x86/mm/init.c +0 -2
index 244ae9c..3002f62 100644
@@ -221,7 +221,6 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
 	if (nx_enabled)
 		printk(KERN_INFO "NX (Execute Disable) protection: active\n");
 
-#ifdef CONFIG_X86_32
 	/* Enable PSE if available */
 	if (cpu_has_pse)
 		set_in_cr4(X86_CR4_PSE);
@@ -231,7 +230,6 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
 		set_in_cr4(X86_CR4_PGE);
 		__supported_pte_mask |= _PAGE_GLOBAL;
 	}
-#endif
 
 	if (use_gbpages)
 		page_size_mask |= 1 << PG_LEVEL_1G;
Signature · 1 line
1.5.4.3
#1 lore raw
Commit-ID:  ac4d3bfdd9e27bfcc0b016c7ac364acb166455a1
Gitweb:     http://git.kernel.org/tip/ac4d3bfdd9e27bfcc0b016c7ac364acb166455a1
Author:     "Pekka Enberg" <[email protected]>
AuthorDate: Thu, 5 Mar 2009 17:22:21 +0200
Commit:     Ingo Molnar <[email protected]>
CommitDate: Fri, 6 Mar 2009 15:25:53 +0100

x86: init_memory_mapping() PSE and PGE setup ifdef removal

Impact: cleanup

Section 3.10 ("PAE-Enabled Paging in IA-32e Mode") of the Intel manual states that The CR4.PSE bit is ignored in IA-32e mode. In 64-bit mode, PGE is enabled at early boot so there's no need to hide setting them up in an ifdef.

LKML-Reference: <1236266541.31324.14.camel@penberg-laptop>

---
 arch/x86/mm/init.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
arch/x86/mm/init.c +0 -2
index 5d06d25..e7d8bb5 100644
@@ -223,7 +223,6 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
 	if (nx_enabled)
 		printk(KERN_INFO "NX (Execute Disable) protection: active\n");
 
-#ifdef CONFIG_X86_32
 	/* Enable PSE if available */
 	if (cpu_has_pse)
 		set_in_cr4(X86_CR4_PSE);
@@ -233,7 +232,6 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
 		set_in_cr4(X86_CR4_PGE);
 		__supported_pte_mask |= _PAGE_GLOBAL;
 	}
-#endif
 
 	if (use_gbpages)
 		page_size_mask |= 1 << PG_LEVEL_1G;