aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2014-09-26 03:23:20 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2014-09-26 06:22:42 -0400
commit242a112af62ea73ce507cbe76c2c944c23b6a1e3 (patch)
tree53cd41c4037d815f7ad6ebcf151243ea9b132e5a /arch/s390/kernel
parent48e9a6c1f54695609b709bf674aac133794ada00 (diff)
s390/setup: correct 4-level kernel page table detection
Fix calculation to decide if a 4-level kernel page table is required. Git commit c972cc60c23f5a63 "s390/vmalloc: have separate modules area" added the separate module area which reduces the size of the vmalloc area but fails to take it into account for the 3 vs 4 level page table decision. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/setup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 82bc113e8c1d..cdfc060dd319 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -452,8 +452,8 @@ static void __init setup_memory_end(void)
452#ifdef CONFIG_64BIT 452#ifdef CONFIG_64BIT
453 vmalloc_size = VMALLOC_END ?: (128UL << 30) - MODULES_LEN; 453 vmalloc_size = VMALLOC_END ?: (128UL << 30) - MODULES_LEN;
454 tmp = (memory_end ?: max_physmem_end) / PAGE_SIZE; 454 tmp = (memory_end ?: max_physmem_end) / PAGE_SIZE;
455 tmp = tmp * (sizeof(struct page) + PAGE_SIZE) + vmalloc_size; 455 tmp = tmp * (sizeof(struct page) + PAGE_SIZE);
456 if (tmp <= (1UL << 42)) 456 if (tmp + vmalloc_size + MODULES_LEN <= (1UL << 42))
457 vmax = 1UL << 42; /* 3-level kernel page table */ 457 vmax = 1UL << 42; /* 3-level kernel page table */
458 else 458 else
459 vmax = 1UL << 53; /* 4-level kernel page table */ 459 vmax = 1UL << 53; /* 4-level kernel page table */