diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index dc7eda3b4ee4..618117c8e063 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c @@ -227,6 +227,16 @@ void arch_cpu_idle(void) */ void machine_shutdown(void) { +#ifdef CONFIG_SMP + /* + * Disable preemption so we're guaranteed to + * run to power off or reboot and prevent + * the possibility of switching to another + * thread that might wind up blocking on + * one of the stopped CPUs. + */ + preempt_disable(); +#endif disable_nonboot_cpus(); }