aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/sclp_cmd.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2008-01-26 08:11:05 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-01-26 08:11:15 -0500
commit48483b3290988952a593c6e66ca354c19f1a4350 (patch)
treeb2b11f14a2ca1a49fe61752064c8897d478536fb /drivers/s390/char/sclp_cmd.c
parent519580fc179be6d06a40edd918747bd5f0e1b899 (diff)
[S390] Get rid of additional_cpus kernel parameter.
It caused only a lot of confusion. From now on cpu hotplug of up to NR_CPUS will work by default. If somebody wants to limit that then the possible_cpus parameter can be used. 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_cmd.c')
-rw-r--r--drivers/s390/char/sclp_cmd.c46
1 files changed, 2 insertions, 44 deletions
diff --git a/drivers/s390/char/sclp_cmd.c b/drivers/s390/char/sclp_cmd.c
index d7e6f4d65b78..b5c23396f8fe 100644
--- a/drivers/s390/char/sclp_cmd.c
+++ b/drivers/s390/char/sclp_cmd.c
@@ -191,9 +191,6 @@ struct read_cpu_info_sccb {
191 u8 reserved[4096 - 16]; 191 u8 reserved[4096 - 16];
192} __attribute__((packed, aligned(PAGE_SIZE))); 192} __attribute__((packed, aligned(PAGE_SIZE)));
193 193
194static struct read_cpu_info_sccb __initdata early_read_cpu_info_sccb;
195static struct sclp_cpu_info __initdata sclp_cpu_info;
196
197static void sclp_fill_cpu_info(struct sclp_cpu_info *info, 194static void sclp_fill_cpu_info(struct sclp_cpu_info *info,
198 struct read_cpu_info_sccb *sccb) 195 struct read_cpu_info_sccb *sccb)
199{ 196{
@@ -208,48 +205,16 @@ static void sclp_fill_cpu_info(struct sclp_cpu_info *info,
208 info->combined * sizeof(struct sclp_cpu_entry)); 205 info->combined * sizeof(struct sclp_cpu_entry));
209} 206}
210 207
211void __init sclp_read_cpu_info_early(void) 208int sclp_get_cpu_info(struct sclp_cpu_info *info)
212{
213 int rc;
214 struct read_cpu_info_sccb *sccb;
215
216 if (!SCLP_HAS_CPU_INFO)
217 return;
218
219 sccb = &early_read_cpu_info_sccb;
220 do {
221 memset(sccb, 0, sizeof(*sccb));
222 sccb->header.length = sizeof(*sccb);
223 rc = sclp_cmd_sync_early(SCLP_CMDW_READ_CPU_INFO, sccb);
224 } while (rc == -EBUSY);
225
226 if (rc)
227 return;
228 if (sccb->header.response_code != 0x10)
229 return;
230 sclp_fill_cpu_info(&sclp_cpu_info, sccb);
231}
232
233static int __init sclp_get_cpu_info_early(struct sclp_cpu_info *info)
234{
235 if (!SCLP_HAS_CPU_INFO)
236 return -EOPNOTSUPP;
237 *info = sclp_cpu_info;
238 return 0;
239}
240
241static int sclp_get_cpu_info_late(struct sclp_cpu_info *info)
242{ 209{
243 int rc; 210 int rc;
244 struct read_cpu_info_sccb *sccb; 211 struct read_cpu_info_sccb *sccb;
245 212
246 if (!SCLP_HAS_CPU_INFO) 213 if (!SCLP_HAS_CPU_INFO)
247 return -EOPNOTSUPP; 214 return -EOPNOTSUPP;
248 sccb = (struct read_cpu_info_sccb *) __get_free_page(GFP_KERNEL 215 sccb = (void *) get_zeroed_page(GFP_KERNEL | GFP_DMA);
249 | GFP_DMA);
250 if (!sccb) 216 if (!sccb)
251 return -ENOMEM; 217 return -ENOMEM;
252 memset(sccb, 0, sizeof(*sccb));
253 sccb->header.length = sizeof(*sccb); 218 sccb->header.length = sizeof(*sccb);
254 rc = do_sync_request(SCLP_CMDW_READ_CPU_INFO, sccb); 219 rc = do_sync_request(SCLP_CMDW_READ_CPU_INFO, sccb);
255 if (rc) 220 if (rc)
@@ -266,13 +231,6 @@ out:
266 return rc; 231 return rc;
267} 232}
268 233
269int __init_refok sclp_get_cpu_info(struct sclp_cpu_info *info)
270{
271 if (slab_is_available())
272 return sclp_get_cpu_info_late(info);
273 return sclp_get_cpu_info_early(info);
274}
275
276struct cpu_configure_sccb { 234struct cpu_configure_sccb {
277 struct sccb_header header; 235 struct sccb_header header;
278} __attribute__((packed, aligned(8))); 236} __attribute__((packed, aligned(8)));