aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/setup.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2006-12-04 09:40:30 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2006-12-04 09:40:30 -0500
commit740b5706b9c4b3767f597b3ea76654c6f2a800b2 (patch)
tree370dc09ec8f3abaecc742003ed9d28eecf636c3b /arch/s390/kernel/setup.c
parenta1a392f0b4f27604811bf8aa8d7636b3b4bc3803 (diff)
[S390] cpcmd <-> __cpcmd calling issues
In case of reipl cpcmd gets called when all other cpus are not running anymore. To prevent deadlocks change __cpcmd so that it doesn't take any locks and call cpcmd or __cpcmd, whatever is correct in the current context. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/setup.c')
-rw-r--r--arch/s390/kernel/setup.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 2aa13e8e000a..9bbef0c65584 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -229,11 +229,11 @@ static void __init conmode_default(void)
229 char *ptr; 229 char *ptr;
230 230
231 if (MACHINE_IS_VM) { 231 if (MACHINE_IS_VM) {
232 __cpcmd("QUERY CONSOLE", query_buffer, 1024, NULL); 232 cpcmd("QUERY CONSOLE", query_buffer, 1024, NULL);
233 console_devno = simple_strtoul(query_buffer + 5, NULL, 16); 233 console_devno = simple_strtoul(query_buffer + 5, NULL, 16);
234 ptr = strstr(query_buffer, "SUBCHANNEL ="); 234 ptr = strstr(query_buffer, "SUBCHANNEL =");
235 console_irq = simple_strtoul(ptr + 13, NULL, 16); 235 console_irq = simple_strtoul(ptr + 13, NULL, 16);
236 __cpcmd("QUERY TERM", query_buffer, 1024, NULL); 236 cpcmd("QUERY TERM", query_buffer, 1024, NULL);
237 ptr = strstr(query_buffer, "CONMODE"); 237 ptr = strstr(query_buffer, "CONMODE");
238 /* 238 /*
239 * Set the conmode to 3215 so that the device recognition 239 * Set the conmode to 3215 so that the device recognition
@@ -242,7 +242,7 @@ static void __init conmode_default(void)
242 * 3215 and the 3270 driver will try to access the console 242 * 3215 and the 3270 driver will try to access the console
243 * device (3215 as console and 3270 as normal tty). 243 * device (3215 as console and 3270 as normal tty).
244 */ 244 */
245 __cpcmd("TERM CONMODE 3215", NULL, 0, NULL); 245 cpcmd("TERM CONMODE 3215", NULL, 0, NULL);
246 if (ptr == NULL) { 246 if (ptr == NULL) {
247#if defined(CONFIG_SCLP_CONSOLE) 247#if defined(CONFIG_SCLP_CONSOLE)
248 SET_CONSOLE_SCLP; 248 SET_CONSOLE_SCLP;
@@ -299,14 +299,14 @@ static void do_machine_restart_nonsmp(char * __unused)
299static void do_machine_halt_nonsmp(void) 299static void do_machine_halt_nonsmp(void)
300{ 300{
301 if (MACHINE_IS_VM && strlen(vmhalt_cmd) > 0) 301 if (MACHINE_IS_VM && strlen(vmhalt_cmd) > 0)
302 cpcmd(vmhalt_cmd, NULL, 0, NULL); 302 __cpcmd(vmhalt_cmd, NULL, 0, NULL);
303 signal_processor(smp_processor_id(), sigp_stop_and_store_status); 303 signal_processor(smp_processor_id(), sigp_stop_and_store_status);
304} 304}
305 305
306static void do_machine_power_off_nonsmp(void) 306static void do_machine_power_off_nonsmp(void)
307{ 307{
308 if (MACHINE_IS_VM && strlen(vmpoff_cmd) > 0) 308 if (MACHINE_IS_VM && strlen(vmpoff_cmd) > 0)
309 cpcmd(vmpoff_cmd, NULL, 0, NULL); 309 __cpcmd(vmpoff_cmd, NULL, 0, NULL);
310 signal_processor(smp_processor_id(), sigp_stop_and_store_status); 310 signal_processor(smp_processor_id(), sigp_stop_and_store_status);
311} 311}
312 312