]> git.baikalelectronics.ru Git - kernel.git/commitdiff
s390/zcore: Rename ipl_block to mitigate name collision
authorPhilipp Rudo <prudo@linux.ibm.com>
Thu, 14 Mar 2019 12:50:32 +0000 (13:50 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 26 Apr 2019 10:34:05 +0000 (12:34 +0200)
With git commit cb6ec7f07e25a580abd06debbb15731e49d5908b
"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: Philipp Rudo <prudo@linux.ibm.com>
Fixes: cb6ec7f07e25 ("s390: move ipl block to .boot.preserved.data section")
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/char/zcore.c

index 76d3c50bf078bc0ce1490a0ec7d571eeac17634a..f75d3bfb5af3516c31096bf1fa8259c41c7c3cc6 100644 (file)
@@ -51,7 +51,7 @@ static struct dentry *zcore_dir;
 static struct dentry *zcore_memmap_file;
 static struct dentry *zcore_reipl_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);
 
@@ -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,
                                 size_t count, loff_t *ppos)
 {
-       if (ipl_block) {
-               diag308(DIAG308_SET, ipl_block);
+       if (zcore_ipl_block) {
+               diag308(DIAG308_SET, zcore_ipl_block);
                diag308(DIAG308_LOAD_CLEAR, NULL);
        }
        return count;
@@ -265,18 +265,20 @@ static int __init zcore_reipl_init(void)
                return rc;
        if (ipib_info.ipib == 0)
                return 0;
-       ipl_block = (void *) __get_free_page(GFP_KERNEL);
-       if (!ipl_block)
+       zcore_ipl_block = (void *) __get_free_page(GFP_KERNEL);
+       if (!zcore_ipl_block)
                return -ENOMEM;
        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
-               rc = memcpy_real(ipl_block, (void *) ipib_info.ipib, PAGE_SIZE);
-       if (rc || (__force u32)csum_partial(ipl_block, ipl_block->hdr.len, 0) !=
+               rc = memcpy_real(zcore_ipl_block, (void *) ipib_info.ipib,
+                                PAGE_SIZE);
+       if (rc || (__force u32)csum_partial(zcore_ipl_block, zcore_ipl_block->hdr.len, 0) !=
            ipib_info.checksum) {
                TRACE("Checksum does not match\n");
-               free_page((unsigned long) ipl_block);
-               ipl_block = NULL;
+               free_page((unsigned long) zcore_ipl_block);
+               zcore_ipl_block = NULL;
        }
        return 0;
 }