From: Thomas Gleixner Date: Wed, 6 Mar 2013 11:18:37 +0000 (+0000) Subject: arm: Use tick broadcast expired check X-Git-Tag: v3.10-rc1~171^2~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=80bbe9f273a38f83ecfc50fe384a57f8428887bd;p=platform%2Fkernel%2Flinux-3.10.git arm: Use tick broadcast expired check Avoid going back into deep idle if the tick broadcast IPI is about to fire. Signed-off-by: Thomas Gleixner Cc: LAK Cc: John Stultz Cc: Arjan van de Veen Cc: Lorenzo Pieralisi Tested-by: Santosh Shilimkar Cc: Jason Liu Link: http://lkml.kernel.org/r/20130306111537.640722922@linutronix.de --- diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 047d3e4..db4ffd0 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c @@ -199,7 +199,16 @@ void cpu_idle(void) #ifdef CONFIG_PL310_ERRATA_769419 wmb(); #endif - if (hlt_counter) { + /* + * In poll mode we reenable interrupts and spin. + * + * Also if we detected in the wakeup from idle + * path that the tick broadcast device expired + * for us, we don't want to go deep idle as we + * know that the IPI is going to arrive right + * away + */ + if (hlt_counter || tick_check_broadcast_expired()) { local_irq_enable(); cpu_relax(); } else if (!need_resched()) {