aboutsummaryrefslogtreecommitdiff
path: root/arch/s390
diff options
context:
space:
mode:
authorMartin Schwidefsky2006-06-29 14:57:32 +0200
committerMartin Schwidefsky2006-06-29 14:57:32 +0200
commit06fa46a2fcb7e13386707a3eac74f11140a9f818 (patch)
tree122423639f15638d04080dd095b939203b9bf645 /arch/s390
parent4980082db1a8aa3ec45aa22cd4a10021955e22ed (diff)
[S390] console_unblank woes.
The software watchdog calls machine_restart from a timer function. The s390 machine_restart calls console_unblank to flush the console output. This is needed for panic to get the panic message printed. If console_unblank is called in interrupt a BUG is triggered in acquire_console_sem. That makes the software watchdog panic instead of restarting the machine. To get around this problem the call to console_unblank is made conditionally on !in_interrupt() || oops_in_progress. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kernel/setup.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index b282034452a4..813444aac7d7 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -289,19 +289,34 @@ void (*_machine_power_off)(void) = do_machine_power_off_nonsmp;
void machine_restart(char *command)
{
- console_unblank();
+ if (!in_interrupt() || oops_in_progress)
+ /*
+ * Only unblank the console if we are called in enabled
+ * context or a bust_spinlocks cleared the way for us.
+ */
+ console_unblank();
_machine_restart(command);
}
void machine_halt(void)
{
- console_unblank();
+ if (!in_interrupt() || oops_in_progress)
+ /*
+ * Only unblank the console if we are called in enabled
+ * context or a bust_spinlocks cleared the way for us.
+ */
+ console_unblank();
_machine_halt();
}
void machine_power_off(void)
{
- console_unblank();
+ if (!in_interrupt() || oops_in_progress)
+ /*
+ * Only unblank the console if we are called in enabled
+ * context or a bust_spinlocks cleared the way for us.
+ */
+ console_unblank();
_machine_power_off();
}