From bc5e17148df5bcb32c18ae3c037a130780aea849 Mon Sep 17 00:00:00 2001 From: Yinghai Lu Date: Wed, 30 Jan 2008 13:34:12 +0100 Subject: [PATCH] --- yaml --- r: 80574 b: refs/heads/master c: 9198715763e8d0fd7fb7578c07916a5313e28b9d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/e820_64.c | 4 ++-- trunk/arch/x86/mm/init_64.c | 7 +++++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 8763a6dd0fae..5d2952179084 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bb4a1d644a84e7e9d1d1fa9d1c7d1017b02e0947 +refs/heads/master: 9198715763e8d0fd7fb7578c07916a5313e28b9d diff --git a/trunk/arch/x86/kernel/e820_64.c b/trunk/arch/x86/kernel/e820_64.c index f8b7bebb4344..c617174e8963 100644 --- a/trunk/arch/x86/kernel/e820_64.c +++ b/trunk/arch/x86/kernel/e820_64.c @@ -70,8 +70,8 @@ void __init reserve_early(unsigned long start, unsigned long end) for (i = 0; i < MAX_EARLY_RES && early_res[i].end; i++) { r = &early_res[i]; if (end > r->start && start < r->end) - panic("Duplicated early reservation %lx-%lx\n", - start, end); + panic("Overlapping early reservations %lx-%lx to %lx-%lx\n", + start, end, r->start, r->end); } if (i >= MAX_EARLY_RES) panic("Too many early reservations"); diff --git a/trunk/arch/x86/mm/init_64.c b/trunk/arch/x86/mm/init_64.c index a95272644591..cc50a13ce8d9 100644 --- a/trunk/arch/x86/mm/init_64.c +++ b/trunk/arch/x86/mm/init_64.c @@ -358,6 +358,13 @@ static void __init find_early_table_space(unsigned long end) if (table_start == -1UL) panic("Cannot find space for the kernel page tables"); + /* + * When you have a lot of RAM like 256GB, early_table will not fit + * into 0x8000 range, find_e820_area() will find area after kernel + * bss but the table_start is not page aligned, so need to round it + * up to avoid overlap with bss: + */ + table_start = round_up(table_start, PAGE_SIZE); table_start >>= PAGE_SHIFT; table_end = table_start;