Skip to content

Commit 2028315

Browse files
committed
parisc: Allow to reboot machine after system halt
In case a machine can't power-off itself on system shutdown, allow the user to reboot it by pressing the RETURN key. Cc: <[email protected]> # v4.14+ Signed-off-by: Helge Deller <[email protected]>
1 parent adf8e96 commit 2028315

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

arch/parisc/kernel/process.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,18 @@ void machine_power_off(void)
122122
/* It seems we have no way to power the system off via
123123
* software. The user has to press the button himself. */
124124

125-
printk(KERN_EMERG "System shut down completed.\n"
126-
"Please power this system off now.");
125+
printk("Power off or press RETURN to reboot.\n");
127126

128127
/* prevent soft lockup/stalled CPU messages for endless loop. */
129128
rcu_sysrq_start();
130129
lockup_detector_soft_poweroff();
131-
for (;;);
130+
while (1) {
131+
/* reboot if user presses RETURN key */
132+
if (pdc_iodc_getc() == 13) {
133+
printk("Rebooting...\n");
134+
machine_restart(NULL);
135+
}
136+
}
132137
}
133138

134139
void (*pm_power_off)(void);

0 commit comments

Comments
 (0)