summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2016-05-10 12:10:22 +0200
committerBen Hutchings <ben@decadent.org.uk>2016-08-22 22:37:57 +0100
commit62582a66d5d3f436cfae65052f6c2a97f5a23c2b (patch)
treeb919fc48466c2935619793991510683d5e99e60e
parentfe5f901ac8ac850f261e1923bfa272ccbc9f53ec (diff)
downloadlinux-stable-62582a66d5d3f436cfae65052f6c2a97f5a23c2b.tar.gz
linux-stable-62582a66d5d3f436cfae65052f6c2a97f5a23c2b.tar.bz2
linux-stable-62582a66d5d3f436cfae65052f6c2a97f5a23c2b.zip
s390/vmem: fix identity mapping
commit c34a69059d7876e0793eb410deedfb08ccb22b02 upstream. The identity mapping is suboptimal for the last 2GB frame. The mapping will be established with a mix of 4KB and 1MB mappings instead of a single 2GB mapping. This happens because of a off-by-one bug introduced with commit 50be63450728 ("s390/mm: Convert bootmem to memblock"). Currently the identity mapping looks like this: 0x0000000080000000-0x0000000180000000 4G PUD RW 0x0000000180000000-0x00000001fff00000 2047M PMD RW 0x00000001fff00000-0x0000000200000000 1M PTE RW With the bug fixed it looks like this: 0x0000000080000000-0x0000000200000000 6G PUD RW Fixes: 50be63450728 ("s390/mm: Convert bootmem to memblock") Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r--arch/s390/mm/vmem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c
index fe9012a49aa5..4f0b2864fd76 100644
--- a/arch/s390/mm/vmem.c
+++ b/arch/s390/mm/vmem.c
@@ -380,7 +380,7 @@ void __init vmem_map_init(void)
ro_end = (unsigned long)&_eshared & PAGE_MASK;
for_each_memblock(memory, reg) {
start = reg->base;
- end = reg->base + reg->size - 1;
+ end = reg->base + reg->size;
if (start >= ro_end || end <= ro_start)
vmem_add_mem(start, end - start, 0);
else if (start >= ro_start && end <= ro_end)