x86, 32-bit: change propagate_e820_map() back to find_max_pfn()
we don't need to call memory_present that early.
numa and sparse will call memory_present later and might
even fail, it will call memory_present for the full range.
also for sparse it will call alloc_bootmem ... before we set up bootmem.
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/kernel/e820_32.c b/arch/x86/kernel/e820_32.c
index db760d4..0c025d0 100644
--- a/arch/x86/kernel/e820_32.c
+++ b/arch/x86/kernel/e820_32.c
@@ -210,7 +210,7 @@
/*
* Find the highest page frame number we have available
*/
-void __init propagate_e820_map(void)
+void __init find_max_pfn(void)
{
int i;
@@ -227,7 +227,6 @@
continue;
if (end > max_pfn)
max_pfn = end;
- memory_present(0, start, end);
}
}
@@ -361,7 +360,7 @@
* size before original memory map is
* reset.
*/
- propagate_e820_map();
+ find_max_pfn();
saved_max_pfn = max_pfn;
#endif
e820.nr_map = 0;
diff --git a/arch/x86/kernel/setup_32.c b/arch/x86/kernel/setup_32.c
index 6f40cb5..2901042 100644
--- a/arch/x86/kernel/setup_32.c
+++ b/arch/x86/kernel/setup_32.c
@@ -730,10 +730,10 @@
efi_init();
/* update e820 for memory not covered by WB MTRRs */
- propagate_e820_map();
+ find_max_pfn();
mtrr_bp_init();
if (mtrr_trim_uncached_memory(max_pfn))
- propagate_e820_map();
+ find_max_pfn();
max_low_pfn = setup_memory();