diff options
author | Hendrik Brueckner <brueckner@linux.vnet.ibm.com> | 2013-12-05 22:03:50 +0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-12-16 17:37:48 +0400 |
commit | 56e57a84a7856130f45009ce1713dc8ec8e59887 (patch) | |
tree | 7d6e48237e56db41364c0f3b0ca9564193d0de3c /drivers/s390 | |
parent | 333cce91f384409fb6a3e656dc11e21e872c5ea2 (diff) | |
download | linux-56e57a84a7856130f45009ce1713dc8ec8e59887.tar.xz |
s390/sclp_early: Replace early_read_info_sccb with sccb_early
Replace early_read_info_sccb and use sccb_early instead.
Also saves some memory.
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Reviewed-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/char/sclp_early.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/s390/char/sclp_early.c b/drivers/s390/char/sclp_early.c index e4e5b32c52f2..dc4ed04cbf50 100644 --- a/drivers/s390/char/sclp_early.c +++ b/drivers/s390/char/sclp_early.c @@ -35,8 +35,7 @@ struct read_info_sccb { u8 _reserved5[4096 - 112]; /* 112-4095 */ } __packed __aligned(PAGE_SIZE); -static __initdata struct read_info_sccb early_read_info_sccb; -static __initdata char sccb_early[PAGE_SIZE] __aligned(PAGE_SIZE); +static char sccb_early[PAGE_SIZE] __aligned(PAGE_SIZE) __initdata; static unsigned long sclp_hsa_size; static struct sclp_ipl_info sclp_ipl_info; @@ -63,14 +62,12 @@ out: return rc; } -static int __init sclp_read_info_early(void) +static int __init sclp_read_info_early(struct read_info_sccb *sccb) { int rc, i; - struct read_info_sccb *sccb; sclp_cmdw_t commands[] = {SCLP_CMDW_READ_SCP_INFO_FORCED, SCLP_CMDW_READ_SCP_INFO}; - sccb = &early_read_info_sccb; for (i = 0; i < ARRAY_SIZE(commands); i++) { do { memset(sccb, 0, sizeof(*sccb)); @@ -92,12 +89,11 @@ static int __init sclp_read_info_early(void) static void __init sclp_facilities_detect(void) { - struct read_info_sccb *sccb; + struct read_info_sccb *sccb = (void *) &sccb_early; - if (sclp_read_info_early()) + if (sclp_read_info_early(sccb)) return; - sccb = &early_read_info_sccb; sclp_facilities = sccb->facilities; sclp_fac84 = sccb->fac84; if (sccb->fac85 & 0x02) |