]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
x86: fix kernel_physical_mapping_init() for large x86 systems
authorIngo Molnar <mingo@elte.hu>
Sun, 20 Jul 2008 15:24:03 +0000 (17:24 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Aug 2008 18:50:50 +0000 (11:50 -0700)
based on e22146e610bb7aed63282148740ab1d1b91e1d90 upstream

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 <steiner@sgi.com>
Cc: linux-mm@kvack.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Oliver Pinter <oliver.pntr@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/mm/init_64.c

index b2c5231c468641c6b69712fb7ed6450168d93a82..8e47740b13a6c80f644053ecd8f73df515462c53 100644 (file)
@@ -427,7 +427,7 @@ void __init_refok init_memory_mapping(unsigned long start, unsigned long end)
                else
                        pud = alloc_low_page(&pud_phys);
 
-               next = start + PGDIR_SIZE;
+               next = (start + PGDIR_SIZE) & PGDIR_MASK;
                if (next > end)
                        next = end;
                phys_pud_init(pud, __pa(start), __pa(next));