]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
arm: Use tick broadcast expired check
authorThomas Gleixner <tglx@linutronix.de>
Wed, 6 Mar 2013 11:18:37 +0000 (11:18 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 13 Mar 2013 10:39:40 +0000 (11:39 +0100)
Avoid going back into deep idle if the tick broadcast IPI is about to
fire.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: LAK <linux-arm-kernel@lists.infradead.org>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Arjan van de Veen <arjan@infradead.org>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Jason Liu <liu.h.jason@gmail.com>
Link: http://lkml.kernel.org/r/20130306111537.640722922@linutronix.de
arch/arm/kernel/process.c

index 047d3e40e47062d4946d7f7c11e8330132340654..db4ffd09ee23b460754cb69d608002594f5b5e17 100644 (file)
@@ -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()) {