diff options
author | Helge Deller <deller@gmx.de> | 2023-05-22 22:57:30 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-05-30 12:38:37 +0100 |
commit | bb0248deecf1f95a0dd9fe373f7b13cc0f8c8a30 (patch) | |
tree | f2d1d2cc040d2f9c27bbed94f5c09048a89b77e6 /arch/parisc | |
parent | f900a4a3a6c7ab801e42dfefce8680048b0d66d9 (diff) | |
download | linux-stable-bb0248deecf1f95a0dd9fe373f7b13cc0f8c8a30.tar.gz linux-stable-bb0248deecf1f95a0dd9fe373f7b13cc0f8c8a30.tar.bz2 linux-stable-bb0248deecf1f95a0dd9fe373f7b13cc0f8c8a30.zip |
parisc: Allow to reboot machine after system halt
commit 2028315cf59bb899a5ac7e87dc48ecb8fac7ac24 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>
Diffstat (limited to 'arch/parisc')
-rw-r--r-- | arch/parisc/kernel/process.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 77650dc80830..12b38a3bcd73 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c @@ -142,13 +142,18 @@ void machine_power_off(void) /* It seems we have no way to power the system off via * software. The user has to press the button himself. */ - printk(KERN_EMERG "System shut down completed.\n" - "Please power this system off now."); + printk("Power off or press RETURN to reboot.\n"); /* prevent soft lockup/stalled CPU messages for endless loop. */ rcu_sysrq_start(); 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) = machine_power_off; |