Skip to content

Commit

Permalink
s390/sclp: Consolidate early sclp init calls to sclp_early_detect()
Browse files Browse the repository at this point in the history
The new function calls the old ones. The sclp_event_mask_early() is removed
and replaced by one invocation of sclp_set_event_mask(0, 0).

Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Michael Holzheu authored and Martin Schwidefsky committed Nov 15, 2013
1 parent acf6a00 commit 7b50da5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 22 deletions.
3 changes: 1 addition & 2 deletions arch/s390/include/asm/sclp.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ struct sclp_cpu_info {
int sclp_get_cpu_info(struct sclp_cpu_info *info);
int sclp_cpu_configure(u8 cpu);
int sclp_cpu_deconfigure(u8 cpu);
void sclp_facilities_detect(void);
unsigned long long sclp_get_rnmax(void);
unsigned long long sclp_get_rzm(void);
int sclp_sdias_blk_count(void);
Expand All @@ -57,7 +56,7 @@ bool sclp_has_vt220(void);
int sclp_pci_configure(u32 fid);
int sclp_pci_deconfigure(u32 fid);
int memcpy_hsa(void *dest, unsigned long src, size_t count, int mode);
void sclp_hsa_size_detect(void);
unsigned long sclp_get_hsa_size(void);
void sclp_early_detect(void);

#endif /* _ASM_S390_SCLP_H */
3 changes: 1 addition & 2 deletions arch/s390/kernel/early.c
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,7 @@ void __init startup_init(void)
detect_diag44();
detect_machine_facilities();
setup_topology();
sclp_facilities_detect();
sclp_hsa_size_detect();
sclp_early_detect();
#ifdef CONFIG_DYNAMIC_FTRACE
S390_lowcore.ftrace_func = (unsigned long)ftrace_caller;
#endif
Expand Down
27 changes: 9 additions & 18 deletions drivers/s390/char/sclp_early.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,7 @@ static void __init sclp_read_info_early(void)
}
}

static void __init sclp_event_mask_early(void)
{
struct init_sccb *sccb = &early_event_mask_sccb;
int rc;

do {
memset(sccb, 0, sizeof(*sccb));
sccb->header.length = sizeof(*sccb);
sccb->mask_length = sizeof(sccb_mask_t);
rc = sclp_cmd_sync_early(SCLP_CMDW_WRITE_EVENT_MASK, sccb);
} while (rc == -EBUSY);
}

void __init sclp_facilities_detect(void)
static void __init sclp_facilities_detect(void)
{
struct read_info_sccb *sccb;

Expand All @@ -122,8 +109,6 @@ void __init sclp_facilities_detect(void)
sclp_rnmax = sccb->rnmax ? sccb->rnmax : sccb->rnmax2;
sclp_rzm = sccb->rnsize ? sccb->rnsize : sccb->rnsize2;
sclp_rzm <<= 20;

sclp_event_mask_early();
}

bool __init sclp_has_linemode(void)
Expand Down Expand Up @@ -246,7 +231,7 @@ unsigned long sclp_get_hsa_size(void)
return sclp_hsa_size;
}

void __init sclp_hsa_size_detect(void)
static void __init sclp_hsa_size_detect(void)
{
long size;

Expand All @@ -268,6 +253,12 @@ void __init sclp_hsa_size_detect(void)
if (size < 0)
return;
out:
sclp_set_event_mask(0, 0);
sclp_hsa_size = size;
}

void __init sclp_early_detect(void)
{
sclp_facilities_detect();
sclp_hsa_size_detect();
sclp_set_event_mask(0, 0);
}

0 comments on commit 7b50da5

Please sign in to comment.