mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
parisc: Allow to reboot machine after system halt
commit 2028315cf5 upstream.
In case a machine can't power-off itself on system shutdown,
allow the user to reboot it by pressing the RETURN key.
Cc: <stable@vger.kernel.org> # v4.14+
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c49ffd89b6
commit
d935edd510
@@ -122,13 +122,18 @@ void machine_power_off(void)
|
|||||||
/* It seems we have no way to power the system off via
|
/* It seems we have no way to power the system off via
|
||||||
* software. The user has to press the button himself. */
|
* software. The user has to press the button himself. */
|
||||||
|
|
||||||
printk(KERN_EMERG "System shut down completed.\n"
|
printk("Power off or press RETURN to reboot.\n");
|
||||||
"Please power this system off now.");
|
|
||||||
|
|
||||||
/* prevent soft lockup/stalled CPU messages for endless loop. */
|
/* prevent soft lockup/stalled CPU messages for endless loop. */
|
||||||
rcu_sysrq_start();
|
rcu_sysrq_start();
|
||||||
lockup_detector_soft_poweroff();
|
lockup_detector_soft_poweroff();
|
||||||
for (;;);
|
while (1) {
|
||||||
|
/* reboot if user presses RETURN key */
|
||||||
|
if (pdc_iodc_getc() == 13) {
|
||||||
|
printk("Rebooting...\n");
|
||||||
|
machine_restart(NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void (*pm_power_off)(void);
|
void (*pm_power_off)(void);
|
||||||
|
|||||||
Reference in New Issue
Block a user