x86: clean up and and print out initial max_pfn_mapped
Do this so we can check the range that is mapped before
init_memory_mapping().
To be able to print out meaningful info, we first have to fix
64-bit to have max_pfn_mapped assigned before that call. This
also unifies the code-path a bit.
[ Impact: print more debug info, cleanup ]
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <49BF0978.40605@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index 95f5ecf2..92d2108 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -132,12 +132,11 @@
*/
#ifdef CONFIG_X86_32
start = 0x7000;
+#else
+ start = 0x8000;
+#endif
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
if (e820_table_start == -1UL)
panic("Cannot find space for the kernel page tables");