Commit de338a37 authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky

[S390] Fix vmalloc area size calculation.

setup_memory_end() uses VMALLOC_END instead of VMALLOC_END_INIT to
calculate the maximum supported size of physical memory. Since
VMALLOC_END is zero, this will cause a crash on 31 bit systems.
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 6721f778
...@@ -476,7 +476,7 @@ static void __init setup_memory_end(void) ...@@ -476,7 +476,7 @@ static void __init setup_memory_end(void)
int i; int i;
memory_size = real_size = 0; memory_size = real_size = 0;
max_phys = VMALLOC_END - VMALLOC_MIN_SIZE; max_phys = VMALLOC_END_INIT - VMALLOC_MIN_SIZE;
memory_end &= PAGE_MASK; memory_end &= PAGE_MASK;
max_mem = memory_end ? min(max_phys, memory_end) : max_phys; max_mem = memory_end ? min(max_phys, memory_end) : max_phys;
......
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