]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
ARM: call disable_nonboot_cpus() from machine_shutdown()
authorStephen Warren <swarren@nvidia.com>
Wed, 2 Jan 2013 21:07:41 +0000 (21:07 +0000)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 23 May 2013 06:54:13 +0000 (08:54 +0200)
On Tegra at least, this change allows kexec to work with SMP enabled.
Without this,  machine_shutdown() simply puts all CPUs into a loop. If
the code of that loop is over-written, the CPUs may hang or crash (which
I do observe in practice), or cause the kexec'd kernel not to be able to
initialize them.

This fix has the added benefit that the kexec always happens on the boot
CPU, and thus kexec mirrors the initial kernel boot as much as possible.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arch/arm/kernel/process.c

index 047d3e40e47062d4946d7f7c11e8330132340654..407258acbae26d0c05c7937d1c61450901a70302 100644 (file)
@@ -234,6 +234,7 @@ __setup("reboot=", reboot_setup);
 
 void machine_shutdown(void)
 {
+       disable_nonboot_cpus();
 #ifdef CONFIG_SMP
        smp_send_stop();
 #endif