From eb33f9eb304a4c18beb5ba6362eaa5c4beaf40d8 Mon Sep 17 00:00:00 2001 From: Vasily Gorbik Date: Fri, 27 Jan 2023 14:57:43 +0100 Subject: 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 Reviewed-by: Alexander Gordeev Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens --- arch/s390/boot/mem_detect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/s390/boot') 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) { -- cgit v1.2.3