Re: [PATCH] x86: not overmap than end in init_memory_mapping - 64bit
From: Yinghai Lu
Date: Wed Jul 09 2008 - 06:01:29 EST
On Wed, Jul 9, 2008 at 1:46 AM, Ingo Molnar <mingo@xxxxxxx> wrote:
>
> * Yinghai Lu <yhlu.kernel@xxxxxxxxx> wrote:
>
>> > reverting the commit solves the crash. The crash seems to be because
>> > ACPI is unable to access that memory range. (perhaps early_ioremap
>> > fails?)
>>
>> system with less than 4g?
>
> yeah.
>
>> please test attached patch
>> [PATCH] x86: make max_pfn cover acpi table below 4g
>
> that fixed it, thanks.
please check fix for 32 bit too.
YH
[PATCH] x86: make e820_end return max ram type only for 32 bit
to avoid warning from find_low_pfn_range for high pages size etc
Signed-off-by: Yinghai Lu <yhlu.kernel@xxxxxxxxx>
---
arch/x86/kernel/e820.c | 5 +++++
1 file changed, 5 insertions(+)
Index: linux-2.6/arch/x86/kernel/e820.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/e820.c
+++ linux-2.6/arch/x86/kernel/e820.c
@@ -1066,6 +1066,11 @@ unsigned long __init e820_end(void)
struct e820entry *ei = &e820.map[i];
unsigned long end_pfn;
+#ifdef CONFIG_X86_32
+ if (ei->type != E820_RAM)
+ continue;
+#endif
+
end_pfn = (ei->addr + ei->size) >> PAGE_SHIFT;
if (end_pfn > last_pfn)
last_pfn = end_pfn;