diff options
author | Vasily Gorbik <gor@linux.ibm.com> | 2023-01-27 14:57:43 +0100 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2023-02-06 11:13:54 +0100 |
commit | eb33f9eb304a4c18beb5ba6362eaa5c4beaf40d8 (patch) | |
tree | 8c146f3f358130cd578d43e9f02bf9a07954c030 /arch/s390/boot | |
parent | 18e5cb7a5ce30d0fd28c94551509afe43b100118 (diff) | |
download | linux-eb33f9eb304a4c18beb5ba6362eaa5c4beaf40d8.tar.gz |
s390/mem_detect: rely on diag260() if sclp_early_get_memsize() fails
In case sclp_early_get_memsize() fails but diag260() succeeds make sure
some sane value is returned. This error scenario is highly unlikely,
but this change makes system able to boot in such case.
Suggested-by: Alexander Gordeev <agordeev@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>
Diffstat (limited to 'arch/s390/boot')
-rw-r--r-- | arch/s390/boot/mem_detect.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/boot/mem_detect.c b/arch/s390/boot/mem_detect.c index 0a5821ef4f1f..41792a3a5e36 100644 --- a/arch/s390/boot/mem_detect.c +++ b/arch/s390/boot/mem_detect.c @@ -176,7 +176,7 @@ unsigned long detect_memory(void) if (!diag260()) { mem_detect.info_source = MEM_DETECT_DIAG260; - return max_physmem_end; + return max_physmem_end ?: get_mem_detect_end(); } if (max_physmem_end) { |