aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <[email protected]>2013-03-06 11:18:37 +0000
committerThomas Gleixner <[email protected]>2013-03-13 11:39:40 +0100
commit80bbe9f273a38f83ecfc50fe384a57f8428887bd (patch)
tree9f45dc17809949d9b4fb1f434b93052ac750c8a7
parenteaa907c546f76222227dfc41784b22588af1e3d7 (diff)
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 <[email protected]> Cc: LAK <[email protected]> Cc: John Stultz <[email protected]> Cc: Arjan van de Veen <[email protected]> Cc: Lorenzo Pieralisi <[email protected]> Tested-by: Santosh Shilimkar <[email protected]> Cc: Jason Liu <[email protected]> Link: http://lkml.kernel.org/r/[email protected]
-rw-r--r--arch/arm/kernel/process.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 047d3e40e470..db4ffd09ee23 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()) {