Commit f3df44e7 authored by Philipp Rudo's avatar Philipp Rudo Committed by Martin Schwidefsky

s390/zcore: Rename ipl_block to mitigate name collision

With git commit 1e941d39
"s390: move ipl block to .boot.preserved.data section" the earl_ipl_block
got renamed to ipl_block and became publicly available via boot_data.h.
This might cause problems with zcore, which has it's own ipl_block
variable. Thus rename the ipl_block in zcore to prevent name collision
and highlight that it's only used locally.
Signed-off-by: default avatarPhilipp Rudo <prudo@linux.ibm.com>
Fixes: 1e941d39 ("s390: move ipl block to .boot.preserved.data section")
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent f6780686
...@@ -51,7 +51,7 @@ static struct dentry *zcore_dir; ...@@ -51,7 +51,7 @@ static struct dentry *zcore_dir;
static struct dentry *zcore_memmap_file; static struct dentry *zcore_memmap_file;
static struct dentry *zcore_reipl_file; static struct dentry *zcore_reipl_file;
static struct dentry *zcore_hsa_file; static struct dentry *zcore_hsa_file;
static struct ipl_parameter_block *ipl_block; static struct ipl_parameter_block *zcore_ipl_block;
static char hsa_buf[PAGE_SIZE] __aligned(PAGE_SIZE); static char hsa_buf[PAGE_SIZE] __aligned(PAGE_SIZE);
...@@ -182,8 +182,8 @@ static const struct file_operations zcore_memmap_fops = { ...@@ -182,8 +182,8 @@ static const struct file_operations zcore_memmap_fops = {
static ssize_t zcore_reipl_write(struct file *filp, const char __user *buf, static ssize_t zcore_reipl_write(struct file *filp, const char __user *buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
if (ipl_block) { if (zcore_ipl_block) {
diag308(DIAG308_SET, ipl_block); diag308(DIAG308_SET, zcore_ipl_block);
diag308(DIAG308_LOAD_CLEAR, NULL); diag308(DIAG308_LOAD_CLEAR, NULL);
} }
return count; return count;
...@@ -265,18 +265,20 @@ static int __init zcore_reipl_init(void) ...@@ -265,18 +265,20 @@ static int __init zcore_reipl_init(void)
return rc; return rc;
if (ipib_info.ipib == 0) if (ipib_info.ipib == 0)
return 0; return 0;
ipl_block = (void *) __get_free_page(GFP_KERNEL); zcore_ipl_block = (void *) __get_free_page(GFP_KERNEL);
if (!ipl_block) if (!zcore_ipl_block)
return -ENOMEM; return -ENOMEM;
if (ipib_info.ipib < sclp.hsa_size) if (ipib_info.ipib < sclp.hsa_size)
rc = memcpy_hsa_kernel(ipl_block, ipib_info.ipib, PAGE_SIZE); rc = memcpy_hsa_kernel(zcore_ipl_block, ipib_info.ipib,
PAGE_SIZE);
else else
rc = memcpy_real(ipl_block, (void *) ipib_info.ipib, PAGE_SIZE); rc = memcpy_real(zcore_ipl_block, (void *) ipib_info.ipib,
if (rc || (__force u32)csum_partial(ipl_block, ipl_block->hdr.len, 0) != PAGE_SIZE);
if (rc || (__force u32)csum_partial(zcore_ipl_block, zcore_ipl_block->hdr.len, 0) !=
ipib_info.checksum) { ipib_info.checksum) {
TRACE("Checksum does not match\n"); TRACE("Checksum does not match\n");
free_page((unsigned long) ipl_block); free_page((unsigned long) zcore_ipl_block);
ipl_block = NULL; zcore_ipl_block = NULL;
} }
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment