diff --git a/arch/x86/kernel/e820_64.c b/arch/x86/kernel/e820_64.c index f8b7bebb43449a52da41e65f096764a07ef1d910..c617174e896382fe91b77a4c70b8ef2996511b92 100644 --- a/arch/x86/kernel/e820_64.c +++ b/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/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index a952726445916012c7c9410bcc6ecdc9f601a2d3..cc50a13ce8d9d855f9f29e884843ed8717c1e0b2 100644 --- a/arch/x86/mm/init_64.c +++ b/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;