Commit 2c679441 authored by Ingo Molnar's avatar Ingo Molnar Committed by Greg Kroah-Hartman

x86: fix kernel_physical_mapping_init() for large x86 systems

based on e22146e6 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: default avatarJack Steiner <steiner@sgi.com>
Cc: linux-mm@kvack.org
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Cc: Oliver Pinter <oliver.pntr@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 36f11ab7
...@@ -579,7 +579,7 @@ unsigned long __init_refok init_memory_mapping(unsigned long start, unsigned lon ...@@ -579,7 +579,7 @@ unsigned long __init_refok init_memory_mapping(unsigned long start, unsigned lon
else else
pud = alloc_low_page(&pud_phys); pud = alloc_low_page(&pud_phys);
next = start + PGDIR_SIZE; next = (start + PGDIR_SIZE) & PGDIR_MASK;
if (next > end) if (next > end)
next = end; next = end;
last_map_addr = phys_pud_init(pud, __pa(start), __pa(next)); last_map_addr = phys_pud_init(pud, __pa(start), __pa(next));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment