From: Jack Steiner Date: Wed, 16 Jul 2008 16:11:59 +0000 (-0500) Subject: x86: fix kernel_physical_mapping_init() for large x86 systems X-Git-Tag: MMI-PSA29.97-13-9~33451^2~22 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e22146e610bb7aed63282148740ab1d1b91e1d90;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git x86: fix kernel_physical_mapping_init() for large x86 systems Fix bug in kernel_physical_mapping_init() that causes kernel page table to be built incorrectly for systems with greater than 512GB of memory. Signed-off-by: Jack Steiner Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 27de2435e008..306049edd553 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -644,7 +644,7 @@ static unsigned long __init kernel_physical_mapping_init(unsigned long start, unsigned long pud_phys; pud_t *pud; - next = start + PGDIR_SIZE; + next = (start + PGDIR_SIZE) & PGDIR_MASK; if (next > end) next = end;