summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasily Gorbik <gor@linux.ibm.com>2018-04-13 17:37:28 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2018-10-09 11:21:13 +0200
commitb09decfd99f8258408decfaa07c5cce6c06fe2cf (patch)
treee58f0ec275ccf8c5766b30f3bb80d2983fe7d3ae
parentf01b8bca088a6fae82fe55cfc95ca9c2096126e8 (diff)
downloadop-kernel-dev-b09decfd99f8258408decfaa07c5cce6c06fe2cf.zip
op-kernel-dev-b09decfd99f8258408decfaa07c5cce6c06fe2cf.tar.gz
s390/sclp: introduce sclp_early_get_hsa_size
Introduce sclp_early_get_hsa_size function to be used during early memory detection. This function allows to find a memory limit imposed during zfcpdump. 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>
-rw-r--r--arch/s390/include/asm/sclp.h1
-rw-r--r--drivers/s390/char/sclp_early_core.c11
2 files changed, 12 insertions, 0 deletions
diff --git a/arch/s390/include/asm/sclp.h b/arch/s390/include/asm/sclp.h
index 32b683f..0cd4bda 100644
--- a/arch/s390/include/asm/sclp.h
+++ b/arch/s390/include/asm/sclp.h
@@ -115,6 +115,7 @@ void sclp_early_printk_force(const char *s);
void __sclp_early_printk(const char *s, unsigned int len, unsigned int force);
int sclp_early_get_memsize(unsigned long *mem);
+int sclp_early_get_hsa_size(unsigned long *hsa_size);
int _sclp_get_core_info(struct sclp_core_info *info);
int sclp_core_configure(u8 core);
int sclp_core_deconfigure(u8 core);
diff --git a/drivers/s390/char/sclp_early_core.c b/drivers/s390/char/sclp_early_core.c
index acfe0931..387c114 100644
--- a/drivers/s390/char/sclp_early_core.c
+++ b/drivers/s390/char/sclp_early_core.c
@@ -288,6 +288,17 @@ int __init sclp_early_get_memsize(unsigned long *mem)
return 0;
}
+int __init sclp_early_get_hsa_size(unsigned long *hsa_size)
+{
+ if (!sclp_info_sccb_valid)
+ return -EIO;
+
+ *hsa_size = 0;
+ if (sclp_info_sccb.hsa_size)
+ *hsa_size = (sclp_info_sccb.hsa_size - 1) * PAGE_SIZE;
+ return 0;
+}
+
#define SCLP_STORAGE_INFO_FACILITY 0x0000400000000000UL
void __weak __init add_mem_detect_block(u64 start, u64 end) {}
OpenPOWER on IntegriCloud