]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.6.2/kernel-sys.c-call-disable_nonboot_cpus-in-kernel_restart.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.6.2 / kernel-sys.c-call-disable_nonboot_cpus-in-kernel_restart.patch
1 From f96972f2dc6365421cf2366ebd61ee4cf060c8d5 Mon Sep 17 00:00:00 2001
2 From: Shawn Guo <shawn.guo@linaro.org>
3 Date: Thu, 4 Oct 2012 17:12:23 -0700
4 Subject: kernel/sys.c: call disable_nonboot_cpus() in kernel_restart()
5
6 From: Shawn Guo <shawn.guo@linaro.org>
7
8 commit f96972f2dc6365421cf2366ebd61ee4cf060c8d5 upstream.
9
10 As kernel_power_off() calls disable_nonboot_cpus(), we may also want to
11 have kernel_restart() call disable_nonboot_cpus(). Doing so can help
12 machines that require boot cpu be the last alive cpu during reboot to
13 survive with kernel restart.
14
15 This fixes one reboot issue seen on imx6q (Cortex-A9 Quad). The machine
16 requires that the restart routine be run on the primary cpu rather than
17 secondary ones. Otherwise, the secondary core running the restart
18 routine will fail to come to online after reboot.
19
20 Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
21 Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
22 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
23 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
24
25 ---
26 kernel/sys.c | 1 +
27 1 file changed, 1 insertion(+)
28
29 --- a/kernel/sys.c
30 +++ b/kernel/sys.c
31 @@ -368,6 +368,7 @@ EXPORT_SYMBOL(unregister_reboot_notifier
32 void kernel_restart(char *cmd)
33 {
34 kernel_restart_prepare(cmd);
35 + disable_nonboot_cpus();
36 if (!cmd)
37 printk(KERN_EMERG "Restarting system.\n");
38 else