Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Vasily Gorbik and committed by
Martin Schwidefsky
b09decfd f01b8bca

+12
+1
arch/s390/include/asm/sclp.h
··· 115 115 void __sclp_early_printk(const char *s, unsigned int len, unsigned int force); 116 116 117 117 int sclp_early_get_memsize(unsigned long *mem); 118 + int sclp_early_get_hsa_size(unsigned long *hsa_size); 118 119 int _sclp_get_core_info(struct sclp_core_info *info); 119 120 int sclp_core_configure(u8 core); 120 121 int sclp_core_deconfigure(u8 core);
+11
drivers/s390/char/sclp_early_core.c
··· 288 288 return 0; 289 289 } 290 290 291 + int __init sclp_early_get_hsa_size(unsigned long *hsa_size) 292 + { 293 + if (!sclp_info_sccb_valid) 294 + return -EIO; 295 + 296 + *hsa_size = 0; 297 + if (sclp_info_sccb.hsa_size) 298 + *hsa_size = (sclp_info_sccb.hsa_size - 1) * PAGE_SIZE; 299 + return 0; 300 + } 301 + 291 302 #define SCLP_STORAGE_INFO_FACILITY 0x0000400000000000UL 292 303 293 304 void __weak __init add_mem_detect_block(u64 start, u64 end) {}