]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
s390/sclp: avoid copy of sclp_info_sccb
authorSumanth Korikkar <sumanthk@linux.ibm.com>
Sun, 8 Nov 2020 20:21:14 +0000 (14:21 -0600)
committerHeiko Carstens <hca@linux.ibm.com>
Wed, 18 Nov 2020 11:16:02 +0000 (12:16 +0100)
For extended sccb support, sccb size could be up to 3 pages. Hence avoid
copy of sclp_info_sccb.

Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Reviewed-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
drivers/s390/char/sclp.h
drivers/s390/char/sclp_early.c
drivers/s390/char/sclp_early_core.c

index 69d9cde9ff5a8d7189453b1d9e18ee7ca1651556..448ed25bf6b895a36994d100a281caf8da2245d5 100644 (file)
@@ -328,7 +328,7 @@ unsigned int sclp_early_con_check_vt220(struct init_sccb *sccb);
 int sclp_early_set_event_mask(struct init_sccb *sccb,
                              sccb_mask_t receive_mask,
                              sccb_mask_t send_mask);
-int sclp_early_get_info(struct read_info_sccb *info);
+struct read_info_sccb * __init sclp_early_get_info(void);
 
 /* useful inlines */
 
index 62e0d35ea1a71f50c496b9225aef3a881e9750f0..cc78b538acbf3ee66da41b5d623f9b9c93959a59 100644 (file)
@@ -22,12 +22,14 @@ static struct sclp_ipl_info sclp_ipl_info;
 struct sclp_info sclp;
 EXPORT_SYMBOL(sclp);
 
-static void __init sclp_early_facilities_detect(struct read_info_sccb *sccb)
+static void __init sclp_early_facilities_detect(void)
 {
        struct sclp_core_entry *cpue;
+       struct read_info_sccb *sccb;
        u16 boot_cpu_address, cpu;
 
-       if (sclp_early_get_info(sccb))
+       sccb = sclp_early_get_info();
+       if (!sccb)
                return;
 
        sclp.facilities = sccb->facilities;
@@ -155,7 +157,7 @@ void __init sclp_early_detect(void)
 {
        void *sccb = sclp_early_sccb;
 
-       sclp_early_facilities_detect(sccb);
+       sclp_early_facilities_detect();
 
        /*
         * Turn off SCLP event notifications.  Also save remote masks in the
index a960afa974bff49b940af8c012ec8a492d947cde..d4fb61c10d7cec57b7a7c1a66b4133a98cab5efc 100644 (file)
@@ -258,13 +258,12 @@ int __init sclp_early_read_info(void)
        return -EIO;
 }
 
-int __init sclp_early_get_info(struct read_info_sccb *info)
+struct read_info_sccb * __init sclp_early_get_info(void)
 {
        if (!sclp_info_sccb_valid)
-               return -EIO;
+               return NULL;
 
-       *info = sclp_info_sccb;
-       return 0;
+       return &sclp_info_sccb;
 }
 
 int __init sclp_early_get_memsize(unsigned long *mem)