summary refs log tree commit diff
path: root/arch/s390/boot
diff options
context:
space:
mode:
authorVasily Gorbik <gor@linux.ibm.com>2018-04-11 18:54:40 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2018-10-09 11:21:11 +0200
commitcd45c995610420755c5fe0d09afee3106c586e26 (patch)
tree06f1ffd49bc1ffe935827e1319dfa15002298a05 /arch/s390/boot
parent6e98e6432995a3094a88bf6024187c3c235be976 (diff)
downloadlinux-cd45c995610420755c5fe0d09afee3106c586e26.tar.gz
s390/mem_detect: use SCLP info for continuous memory detection
When neither SCLP storage info, nor z/VM diag260 "storage configuration"
are available assume a continuous online memory of size specified by
SCLP info.

Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Reviewed-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/boot')
-rw-r--r--arch/s390/boot/mem_detect.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/s390/boot/mem_detect.c b/arch/s390/boot/mem_detect.c
index 42b0cd23f04a..3becf6bbe4c7 100644
--- a/arch/s390/boot/mem_detect.c
+++ b/arch/s390/boot/mem_detect.c
@@ -184,8 +184,13 @@ void detect_memory(void)
 		return;
 	}
 
+	if (max_physmem_end) {
+		add_mem_detect_block(0, max_physmem_end);
+		mem_detect.info_source = MEM_DETECT_SCLP_READ_INFO;
+		return;
+	}
+
 	scan_memory(rzm);
 	mem_detect.info_source = MEM_DETECT_TPROT_LOOP;
-	if (!max_physmem_end)
-		max_physmem_end = get_mem_detect_end();
+	max_physmem_end = get_mem_detect_end();
 }