aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/sclp_info.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2007-07-10 05:24:10 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2007-07-10 05:24:43 -0400
commit83119ad4a1ceacd99f380086c2855ae2c4268afc (patch)
tree6da1d5cdba6e5bcd8fcdf5332700e8353b4e79a8 /drivers/s390/char/sclp_info.c
parent05dd25307ca67cbfa0207bbba2e6c79fa97d125b (diff)
[S390] sclp: Test facility list before executing a service call.
Check if a command is available before executing. Saves some superfluous service calls that won't succeed anyway. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/char/sclp_info.c')
-rw-r--r--drivers/s390/char/sclp_info.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/s390/char/sclp_info.c b/drivers/s390/char/sclp_info.c
index 7d21dbb12fcd..a1136e052750 100644
--- a/drivers/s390/char/sclp_info.c
+++ b/drivers/s390/char/sclp_info.c
@@ -30,6 +30,8 @@ struct sclp_readinfo_sccb {
30static struct sclp_readinfo_sccb __initdata early_readinfo_sccb; 30static struct sclp_readinfo_sccb __initdata early_readinfo_sccb;
31static int __initdata early_readinfo_sccb_valid; 31static int __initdata early_readinfo_sccb_valid;
32 32
33u64 sclp_facilities;
34
33void __init sclp_readinfo_early(void) 35void __init sclp_readinfo_early(void)
34{ 36{
35 int ret; 37 int ret;
@@ -70,6 +72,13 @@ void __init sclp_readinfo_early(void)
70 __ctl_clear_bit(0, 9); 72 __ctl_clear_bit(0, 9);
71} 73}
72 74
75void __init sclp_facilities_detect(void)
76{
77 if (!early_readinfo_sccb_valid)
78 return;
79 sclp_facilities = early_readinfo_sccb.facilities;
80}
81
73unsigned long long __init sclp_memory_detect(void) 82unsigned long long __init sclp_memory_detect(void)
74{ 83{
75 unsigned long long memsize; 84 unsigned long long memsize;