Skip to content

Commit 0fb2a1f

Browse files
heicarstgregkh
authored andcommitted
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 50be634 ("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: 50be634 ("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> Cc: Jean Delvare <jdelvare@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 30c9187 commit 0fb2a1f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/s390/mm/vmem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ void __init vmem_map_init(void)
372372
ro_end = (unsigned long)&_eshared & PAGE_MASK;
373373
for_each_memblock(memory, reg) {
374374
start = reg->base;
375-
end = reg->base + reg->size - 1;
375+
end = reg->base + reg->size;
376376
if (start >= ro_end || end <= ro_start)
377377
vmem_add_mem(start, end - start, 0);
378378
else if (start >= ro_start && end <= ro_end)

0 commit comments

Comments
 (0)