s390/sclp: unify basic sclp access by exposing "struct sclp"
Let's unify basic access to sclp fields by storing the data in an external struct in asm/sclp.h. The values can now directly be accessed by other components, so there is no need for most accessor functions and external variables anymore. The mtid, mtid_max and facility part will be cleaned up separately. Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:

committed by
Martin Schwidefsky

parent
9747bc47b3
commit
37c5f6c86c
@@ -122,7 +122,7 @@ static ssize_t copy_oldmem_page_zfcpdump(char *buf, size_t csize,
|
||||
{
|
||||
int rc;
|
||||
|
||||
if (src < sclp_get_hsa_size()) {
|
||||
if (src < sclp.hsa_size) {
|
||||
rc = memcpy_hsa(buf, src, csize, userbuf);
|
||||
} else {
|
||||
if (userbuf)
|
||||
@@ -215,7 +215,7 @@ static int remap_oldmem_pfn_range_zfcpdump(struct vm_area_struct *vma,
|
||||
unsigned long pfn,
|
||||
unsigned long size, pgprot_t prot)
|
||||
{
|
||||
unsigned long hsa_end = sclp_get_hsa_size();
|
||||
unsigned long hsa_end = sclp.hsa_size;
|
||||
unsigned long size_hsa;
|
||||
|
||||
if (pfn < hsa_end >> PAGE_SHIFT) {
|
||||
@@ -258,7 +258,7 @@ int copy_from_oldmem(void *dest, void *src, size_t count)
|
||||
return rc;
|
||||
}
|
||||
} else {
|
||||
unsigned long hsa_end = sclp_get_hsa_size();
|
||||
unsigned long hsa_end = sclp.hsa_size;
|
||||
if ((unsigned long) src < hsa_end) {
|
||||
copied = min(count, hsa_end - (unsigned long) src);
|
||||
rc = memcpy_hsa(dest, (unsigned long) src, copied, 0);
|
||||
@@ -609,7 +609,7 @@ int elfcorehdr_alloc(unsigned long long *addr, unsigned long long *size)
|
||||
if (elfcorehdr_addr != ELFCORE_ADDR_MAX)
|
||||
return 0;
|
||||
/* If we cannot get HSA size for zfcpdump return error */
|
||||
if (ipl_info.type == IPL_TYPE_FCP_DUMP && !sclp_get_hsa_size())
|
||||
if (ipl_info.type == IPL_TYPE_FCP_DUMP && !sclp.hsa_size)
|
||||
return -ENODEV;
|
||||
|
||||
/* For kdump, exclude previous crashkernel memory */
|
||||
|
Reference in New Issue
Block a user