summaryrefslogtreecommitdiff
path: root/arch/s390
diff options
context:
space:
mode:
authorVasily Gorbik <gor@linux.ibm.com>2018-04-11 19:54:40 +0300
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2018-10-09 12:21:11 +0300
commitcd45c995610420755c5fe0d09afee3106c586e26 (patch)
tree06f1ffd49bc1ffe935827e1319dfa15002298a05 /arch/s390
parent6e98e6432995a3094a88bf6024187c3c235be976 (diff)
downloadlinux-cd45c995610420755c5fe0d09afee3106c586e26.tar.xz
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')
-rw-r--r--arch/s390/boot/mem_detect.c9
-rw-r--r--arch/s390/include/asm/mem_detect.h1
2 files changed, 8 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();
}
diff --git a/arch/s390/include/asm/mem_detect.h b/arch/s390/include/asm/mem_detect.h
index 6047a28656f5..153c3542fa8a 100644
--- a/arch/s390/include/asm/mem_detect.h
+++ b/arch/s390/include/asm/mem_detect.h
@@ -8,6 +8,7 @@ enum mem_info_source {
MEM_DETECT_NONE = 0,
MEM_DETECT_SCLP_STOR_INFO,
MEM_DETECT_DIAG260,
+ MEM_DETECT_SCLP_READ_INFO,
MEM_DETECT_TPROT_LOOP
};