mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86: find_early_table_space() cleanup
@ 2009-03-05 14:09 Pekka Enberg
  0 siblings, 0 replies; only message in thread
From: Pekka Enberg @ 2009-03-05 14:09 UTC (permalink / raw)
  To: mingo; +Cc: x86, linux-kernel

From: Pekka Enberg <penberg@cs.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@cs.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




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-05 14:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-05 14:09 [PATCH] x86: find_early_table_space() cleanup Pekka Enberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®