From: Shawn Guo Date: Thu, 13 Sep 2012 01:01:05 +0000 (+1000) Subject: kernel/sys.c: call disable_nonboot_cpus() in kernel_restart() X-Git-Tag: next-20120918~1^2~108 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c3a1ebb4c6bc79309560b52c01498321a2d7e0e6;p=karo-tx-linux.git 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 Cc: Signed-off-by: Andrew Morton --- diff --git a/kernel/sys.c b/kernel/sys.c index 241507f23eca..6fab59a1fc24 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -368,6 +368,7 @@ EXPORT_SYMBOL(unregister_reboot_notifier); void kernel_restart(char *cmd) { kernel_restart_prepare(cmd); + disable_nonboot_cpus(); if (!cmd) printk(KERN_EMERG "Restarting system.\n"); else