From: Chad Goodman Date: Mon, 10 Dec 2012 06:03:22 +0000 (-0800) Subject: ARM: disable preemption in machine_shutdown X-Git-Url: https://ziggy471.com/git/gitweb.cgi?p=ziggy471-sgn2-jb.git;a=commitdiff;h=6e662228ef2fa9074ff1fced87ffa792150ffa78 ARM: disable preemption in machine_shutdown Signed-off-by: Ziggy --- --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c @@ -272,6 +272,15 @@ __setup("reboot=", reboot_setup); 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(); + smp_send_stop(); #endif }