Skip to content

Commit f96972f

Browse files
Shawn Guotorvalds
authored andcommitted
kernel/sys.c: call disable_nonboot_cpus() in kernel_restart()
As kernel_power_off() calls disable_nonboot_cpus(), we may also want to have kernel_restart() call disable_nonboot_cpus(). Doing so can help machines that require boot cpu be the last alive cpu during reboot to survive with kernel restart. This fixes one reboot issue seen on imx6q (Cortex-A9 Quad). The machine requires that the restart routine be run on the primary cpu rather than secondary ones. Otherwise, the secondary core running the restart routine will fail to come to online after reboot. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 9f6547a commit f96972f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎kernel/sys.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ EXPORT_SYMBOL(unregister_reboot_notifier);
368368
void kernel_restart(char *cmd)
369369
{
370370
kernel_restart_prepare(cmd);
371+
disable_nonboot_cpus();
371372
if (!cmd)
372373
printk(KERN_EMERG "Restarting system.\n");
373374
else

0 commit comments

Comments
 (0)