aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/sclp_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/char/sclp_cmd.c')
-rw-r--r--drivers/s390/char/sclp_cmd.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/drivers/s390/char/sclp_cmd.c b/drivers/s390/char/sclp_cmd.c
index 4f45884c92c3..0c2b77493db4 100644
--- a/drivers/s390/char/sclp_cmd.c
+++ b/drivers/s390/char/sclp_cmd.c
@@ -67,7 +67,7 @@ out:
67 return rc; 67 return rc;
68} 68}
69 69
70void __init sclp_read_info_early(void) 70static void __init sclp_read_info_early(void)
71{ 71{
72 int rc; 72 int rc;
73 int i; 73 int i;
@@ -97,30 +97,33 @@ void __init sclp_read_info_early(void)
97 97
98void __init sclp_facilities_detect(void) 98void __init sclp_facilities_detect(void)
99{ 99{
100 if (!early_read_info_sccb_valid)
101 return;
102 sclp_facilities = early_read_info_sccb.facilities;
103 sclp_fac84 = early_read_info_sccb.fac84;
104}
105
106unsigned long long __init sclp_memory_detect(void)
107{
108 unsigned long long memsize;
109 struct read_info_sccb *sccb; 100 struct read_info_sccb *sccb;
110 101
102 sclp_read_info_early();
111 if (!early_read_info_sccb_valid) 103 if (!early_read_info_sccb_valid)
112 return 0; 104 return;
105
113 sccb = &early_read_info_sccb; 106 sccb = &early_read_info_sccb;
107 sclp_facilities = sccb->facilities;
108 sclp_fac84 = sccb->fac84;
114 rnmax = sccb->rnmax ? sccb->rnmax : sccb->rnmax2; 109 rnmax = sccb->rnmax ? sccb->rnmax : sccb->rnmax2;
115 rzm = sccb->rnsize ? sccb->rnsize : sccb->rnsize2; 110 rzm = sccb->rnsize ? sccb->rnsize : sccb->rnsize2;
116 rzm <<= 20; 111 rzm <<= 20;
117 memsize = rzm * rnmax; 112}
118 return memsize; 113
114unsigned long long sclp_get_rnmax(void)
115{
116 return rnmax;
117}
118
119unsigned long long sclp_get_rzm(void)
120{
121 return rzm;
119} 122}
120 123
121/* 124/*
122 * This function will be called after sclp_memory_detect(), which gets called 125 * This function will be called after sclp_facilities_detect(), which gets
123 * early from early.c code. Therefore the sccb should have valid contents. 126 * called from early.c code. Therefore the sccb should have valid contents.
124 */ 127 */
125void __init sclp_get_ipl_info(struct sclp_ipl_info *info) 128void __init sclp_get_ipl_info(struct sclp_ipl_info *info)
126{ 129{