Skip to contentSkip to conversation

x86: find_early_table_space() cleanup

PATCH New Pekka Enberg 1 participant 1 message Mar 5, 2009

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

PATCH 1/1 x86: find_early_table_space() cleanup

From: Pekka Enberg <[email protected]>

Impact: cleanup

The init_memory_mapping() function (and thus find_early_table_space) is called from only one place on 32-bit. The call-site is in setup_arch() and the 'end' parameter passed is explicitly set to max_pfn_mapped << PAGE_SHIFT. Therefore, we can move the find_e820_area() call out of the ifdef.

---
 arch/x86/mm/init.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
arch/x86/mm/init.c +1 -3
index 6d63e3d..a830a06 100644
@@ -65,12 +65,10 @@ static void __init find_early_table_space(unsigned long end, int use_pse,
 	 */
 #ifdef CONFIG_X86_32
 	start = 0x7000;
-	e820_table_start = find_e820_area(start, max_pfn_mapped<<PAGE_SHIFT,
-					tables, PAGE_SIZE);
 #else /* CONFIG_X86_64 */
 	start = 0x8000;
-	e820_table_start = find_e820_area(start, end, tables, PAGE_SIZE);
 #endif
+	e820_table_start = find_e820_area(start, end, tables, PAGE_SIZE);
 	if (e820_table_start == -1UL)
 		panic("Cannot find space for the kernel page tables");
 
Signature · 1 line
1.5.4.3