diff options
author | Hendrik Brueckner <brueckner@linux.vnet.ibm.com> | 2013-12-05 13:03:50 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-12-16 08:37:48 -0500 |
commit | 56e57a84a7856130f45009ce1713dc8ec8e59887 (patch) | |
tree | 7d6e48237e56db41364c0f3b0ca9564193d0de3c | |
parent | 333cce91f384409fb6a3e656dc11e21e872c5ea2 (diff) |
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>
-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 { | |||
35 | u8 _reserved5[4096 - 112]; /* 112-4095 */ | 35 | u8 _reserved5[4096 - 112]; /* 112-4095 */ |
36 | } __packed __aligned(PAGE_SIZE); | 36 | } __packed __aligned(PAGE_SIZE); |
37 | 37 | ||
38 | static __initdata struct read_info_sccb early_read_info_sccb; | 38 | static char sccb_early[PAGE_SIZE] __aligned(PAGE_SIZE) __initdata; |
39 | static __initdata char sccb_early[PAGE_SIZE] __aligned(PAGE_SIZE); | ||
40 | static unsigned long sclp_hsa_size; | 39 | static unsigned long sclp_hsa_size; |
41 | static struct sclp_ipl_info sclp_ipl_info; | 40 | static struct sclp_ipl_info sclp_ipl_info; |
42 | 41 | ||
@@ -63,14 +62,12 @@ out: | |||
63 | return rc; | 62 | return rc; |
64 | } | 63 | } |
65 | 64 | ||
66 | static int __init sclp_read_info_early(void) | 65 | static int __init sclp_read_info_early(struct read_info_sccb *sccb) |
67 | { | 66 | { |
68 | int rc, i; | 67 | int rc, i; |
69 | struct read_info_sccb *sccb; | ||
70 | sclp_cmdw_t commands[] = {SCLP_CMDW_READ_SCP_INFO_FORCED, | 68 | sclp_cmdw_t commands[] = {SCLP_CMDW_READ_SCP_INFO_FORCED, |
71 | SCLP_CMDW_READ_SCP_INFO}; | 69 | SCLP_CMDW_READ_SCP_INFO}; |
72 | 70 | ||
73 | sccb = &early_read_info_sccb; | ||
74 | for (i = 0; i < ARRAY_SIZE(commands); i++) { | 71 | for (i = 0; i < ARRAY_SIZE(commands); i++) { |
75 | do { | 72 | do { |
76 | memset(sccb, 0, sizeof(*sccb)); | 73 | memset(sccb, 0, sizeof(*sccb)); |
@@ -92,12 +89,11 @@ static int __init sclp_read_info_early(void) | |||
92 | 89 | ||
93 | static void __init sclp_facilities_detect(void) | 90 | static void __init sclp_facilities_detect(void) |
94 | { | 91 | { |
95 | struct read_info_sccb *sccb; | 92 | struct read_info_sccb *sccb = (void *) &sccb_early; |
96 | 93 | ||
97 | if (sclp_read_info_early()) | 94 | if (sclp_read_info_early(sccb)) |
98 | return; | 95 | return; |
99 | 96 | ||
100 | sccb = &early_read_info_sccb; | ||
101 | sclp_facilities = sccb->facilities; | 97 | sclp_facilities = sccb->facilities; |
102 | sclp_fac84 = sccb->fac84; | 98 | sclp_fac84 = sccb->fac84; |
103 | if (sccb->fac85 & 0x02) | 99 | if (sccb->fac85 & 0x02) |