mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch 9/24] s390: console_unblank woes.
@ 2006-06-14 14:01 Martin Schwidefsky
  0 siblings, 0 replies; only message in thread
From: Martin Schwidefsky @ 2006-06-14 14:01 UTC (permalink / raw)
  To: linux-kernel

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

[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>
---

 arch/s390/kernel/setup.c |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff -urpN linux-2.6/arch/s390/kernel/setup.c linux-2.6-patched/arch/s390/kernel/setup.c
--- linux-2.6/arch/s390/kernel/setup.c	2006-06-14 14:29:10.000000000 +0200
+++ linux-2.6-patched/arch/s390/kernel/setup.c	2006-06-14 14:29:42.000000000 +0200
@@ -297,19 +297,34 @@ void (*_machine_power_off)(void) = do_ma
 
 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();
 }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-06-14 14:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-14 14:01 [patch 9/24] s390: console_unblank woes Martin Schwidefsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®