mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
s390/mem_detect: rely on diag260() if sclp_early_get_memsize() fails
[ Upstream commiteb33f9eb30] 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> Stable-dep-of:22476f47b6("s390/boot: fix mem_detect extended area allocation") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a5178cd3a8
commit
f458b7f354
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user