From 9ace52b11aca9bbb657a35612c72c83c85b7e92c Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Mon, 21 Mar 2016 16:23:35 -0700 Subject: ARM: disable_nonboot_cpus before poweroff If poweroff takes a bit more time (e.g. due to I2C call), it is quite likely that another timer interrupt fires. Timer interrupt get broadcasted through the timer interrupt callback tick_handle_oneshot_broadcast. This code broadcasts the timer interrupt to all CPU's in tick_broadcast_oneshot_mask. The only function which removes CPU from this mask is tick_shutdown_broadcast_oneshot which ultimately get called by _cpu_down (in kernel/cpu.c). The function disable_nonboot_cpus makes sure that the CPU's get properly taken down and _cpu_down gets called. With that no more broadcasts are sent to CPU's which are no longer online. Signed-off-by: Stefan Agner --- arch/arm/kernel/process.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index f5e98acf1c07..40d88d93bdf7 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c @@ -214,6 +214,7 @@ void machine_halt(void) */ void machine_power_off(void) { + disable_nonboot_cpus(); local_irq_disable(); smp_send_stop(); -- cgit v1.2.3