Skip to content

Commit

Permalink
s390/sclp_early: Replace early_read_info_sccb with sccb_early
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hendrik Brueckner authored and Martin Schwidefsky committed Dec 16, 2013
1 parent 333cce9 commit 56e57a8
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions drivers/s390/char/sclp_early.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -63,14 +62,12 @@ static int __init sclp_cmd_sync_early(sclp_cmdw_t cmd, void *sccb)
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));
Expand All @@ -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)
Expand Down

0 comments on commit 56e57a8

Please sign in to comment.