summaryrefslogtreecommitdiff
path: root/arch/s390
diff options
context:
space:
mode:
authorVasily Gorbik <gor@linux.ibm.com>2018-04-11 19:42:37 +0300
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2018-10-09 12:21:09 +0300
commitfddbaa5c423f7ca0a187f88e0b1d98a5c8b4edcf (patch)
tree46a7d3abb256fd904cae502a76409be1f1b4afd9 /arch/s390
parent251b72a440fa8c550d64d9a9f35e6e1b5b9637df (diff)
downloadlinux-fddbaa5c423f7ca0a187f88e0b1d98a5c8b4edcf.tar.xz
s390/mem_detect: introduce SCLP storage info
SCLP storage info allows to detect continuous and non-continuous online memory under LPAR, z/VM and KVM, when standby memory is defined. 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.c6
-rw-r--r--arch/s390/include/asm/mem_detect.h3
-rw-r--r--arch/s390/include/asm/sclp.h1
3 files changed, 10 insertions, 0 deletions
diff --git a/arch/s390/boot/mem_detect.c b/arch/s390/boot/mem_detect.c
index 920e6fee75de..8974e3dde1e4 100644
--- a/arch/s390/boot/mem_detect.c
+++ b/arch/s390/boot/mem_detect.c
@@ -126,6 +126,12 @@ void detect_memory(void)
unsigned long rzm;
sclp_early_get_meminfo(&max_physmem_end, &rzm);
+
+ if (!sclp_early_read_storage_info()) {
+ mem_detect.info_source = MEM_DETECT_SCLP_STOR_INFO;
+ return;
+ }
+
scan_memory(rzm);
mem_detect.info_source = MEM_DETECT_TPROT_LOOP;
if (!max_physmem_end)
diff --git a/arch/s390/include/asm/mem_detect.h b/arch/s390/include/asm/mem_detect.h
index 8586adef1c65..00426c07f6df 100644
--- a/arch/s390/include/asm/mem_detect.h
+++ b/arch/s390/include/asm/mem_detect.h
@@ -6,6 +6,7 @@
enum mem_info_source {
MEM_DETECT_NONE = 0,
+ MEM_DETECT_SCLP_STOR_INFO,
MEM_DETECT_TPROT_LOOP
};
@@ -32,6 +33,8 @@ struct mem_detect_info {
};
extern struct mem_detect_info mem_detect;
+void add_mem_detect_block(u64 start, u64 end);
+
static inline int __get_mem_detect_block(u32 n, unsigned long *start,
unsigned long *end)
{
diff --git a/arch/s390/include/asm/sclp.h b/arch/s390/include/asm/sclp.h
index c21a8b637a11..e0da13c0ef79 100644
--- a/arch/s390/include/asm/sclp.h
+++ b/arch/s390/include/asm/sclp.h
@@ -106,6 +106,7 @@ struct zpci_report_error_header {
} __packed;
int sclp_early_read_info(void);
+int sclp_early_read_storage_info(void);
int sclp_early_get_core_info(struct sclp_core_info *info);
void sclp_early_get_ipl_info(struct sclp_ipl_info *info);
void sclp_early_detect(void);