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>
void machine_shutdown(void)
{
+ disable_nonboot_cpus();
#ifdef CONFIG_SMP
smp_send_stop();
#endif