[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1236262162.31324.6.camel@penberg-laptop>
Date:	Thu, 05 Mar 2009 16:09:22 +0200
From:	Pekka Enberg <penberg@...helsinki.fi>
To:	mingo@...e.hu
Cc:	x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] x86: find_early_table_space() cleanup
From: Pekka Enberg <penberg@...helsinki.fi>
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.
Signed-off-by: Pekka Enberg <penberg@...helsinki.fi>
---
 arch/x86/mm/init.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index 6d63e3d..a830a06 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -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");
 
-- 
1.5.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists