Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 06fa46a2 authored by Martin Schwidefsky's avatar Martin Schwidefsky
Browse files

[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: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 4980082d
Loading
Loading
Loading
Loading
+18 −3
Original line number Original line Diff line number Diff line
@@ -289,18 +289,33 @@ void (*_machine_power_off)(void) = do_machine_power_off_nonsmp;


void machine_restart(char *command)
void machine_restart(char *command)
{
{
	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();
		console_unblank();
	_machine_restart(command);
	_machine_restart(command);
}
}


void machine_halt(void)
void machine_halt(void)
{
{
	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();
		console_unblank();
	_machine_halt();
	_machine_halt();
}
}


void machine_power_off(void)
void machine_power_off(void)
{
{
	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();
		console_unblank();
	_machine_power_off();
	_machine_power_off();
}
}