From: Yinghai Lu Date: Thu, 26 Jun 2008 07:44:56 +0000 (-0700) Subject: x86: fix memory setup bug X-Git-Tag: v2.6.27-rc1~1106^2~162 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9d19f4a51447930db002409945ad40a7a373cb0;p=linux-2.6 x86: fix memory setup bug interesting... [ 0.000000] mapped low ram: 0 - 20000000 [ 0.000000] low ram: 00000000 - 1fff0000 [ 0.000000] bootmap 00002000 - 00006000 max_pfn_mapped > max_low_pfn? it seems init_memory_mapping reveals an old bug. please check attached test patch. Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/setup_32.c b/arch/x86/kernel/setup_32.c index 4b953dc938..392812d3c6 100644 --- a/arch/x86/kernel/setup_32.c +++ b/arch/x86/kernel/setup_32.c @@ -427,7 +427,7 @@ void __init setup_arch(char **cmdline_p) find_low_pfn_range(); /* max_pfn_mapped is updated here */ - init_memory_mapping(0, (max_low_pfn << PAGE_SHIFT)); + max_pfn_mapped = init_memory_mapping(0, (max_low_pfn << PAGE_SHIFT)); reserve_initrd();