Skip to content

Commit

Permalink
[S390] console_unblank woes.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Martin Schwidefsky committed Jun 29, 2006
1 parent 4980082 commit 06fa46a
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions arch/s390/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 06fa46a

Please sign in to comment.