[PATCH] x86: find_early_table_space() cleanup

From: Pekka Enberg
Date: Thu Mar 05 2009 - 09:09:36 EST


From: Pekka Enberg <penberg@xxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxx>
---
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/