提交 b09decfd 编写于 作者: V Vasily Gorbik 提交者: Martin Schwidefsky

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: NHeiko Carstens <heiko.carstens@de.ibm.com>
Reviewed-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: NVasily Gorbik <gor@linux.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 f01b8bca
...@@ -115,6 +115,7 @@ void sclp_early_printk_force(const char *s); ...@@ -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); 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_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_get_core_info(struct sclp_core_info *info);
int sclp_core_configure(u8 core); int sclp_core_configure(u8 core);
int sclp_core_deconfigure(u8 core); int sclp_core_deconfigure(u8 core);
......
...@@ -288,6 +288,17 @@ int __init sclp_early_get_memsize(unsigned long *mem) ...@@ -288,6 +288,17 @@ int __init sclp_early_get_memsize(unsigned long *mem)
return 0; 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 #define SCLP_STORAGE_INFO_FACILITY 0x0000400000000000UL
void __weak __init add_mem_detect_block(u64 start, u64 end) {} void __weak __init add_mem_detect_block(u64 start, u64 end) {}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册