s390/mem_detect: do not truncate online memory ranges info
authorVasily Gorbik <gor@linux.ibm.com>
Fri, 10 Feb 2023 14:47:06 +0000 (15:47 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Tue, 14 Feb 2023 10:45:40 +0000 (11:45 +0100)
commitaf0735269b72333d06e9677cb843bf5ce689a38c
tree02604174585bae1e3ef0225289090f0c02a57597
parent55d169c87db1d0faa95313809f18f8b49cafdd75
s390/mem_detect: do not truncate online memory ranges info

Commit bf64f0517e5d ("s390/mem_detect: handle online memory limit
just once") introduced truncation of mem_detect online ranges
based on identity mapping size. For kdump case however the full
set of online memory ranges has to be feed into memblock_physmem_add
so that crashed system memory could be extracted.

Instead of truncating introduce a "usable limit" which is respected by
mem_detect api. Also add extra online memory ranges iterator which still
provides full set of online memory ranges disregarding the "usable limit".

Fixes: bf64f0517e5d ("s390/mem_detect: handle online memory limit just once")
Reported-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Tested-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/boot/boot.h
arch/s390/boot/kaslr.c
arch/s390/boot/mem_detect.c
arch/s390/boot/startup.c
arch/s390/boot/vmem.c
arch/s390/include/asm/mem_detect.h
arch/s390/kernel/setup.c
arch/s390/mm/kasan_init.c