|
@@ -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();
|
|
|
}
|
|
|
|