diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-03-06 06:18:37 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2013-03-13 06:39:40 -0400 |
commit | 80bbe9f273a38f83ecfc50fe384a57f8428887bd (patch) | |
tree | 9f45dc17809949d9b4fb1f434b93052ac750c8a7 | |
parent | eaa907c546f76222227dfc41784b22588af1e3d7 (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 <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
-rw-r--r-- | arch/arm/kernel/process.c | 11 |
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) | |||
199 | #ifdef CONFIG_PL310_ERRATA_769419 | 199 | #ifdef CONFIG_PL310_ERRATA_769419 |
200 | wmb(); | 200 | wmb(); |
201 | #endif | 201 | #endif |
202 | if (hlt_counter) { | 202 | /* |
203 | * In poll mode we reenable interrupts and spin. | ||
204 | * | ||
205 | * Also if we detected in the wakeup from idle | ||
206 | * path that the tick broadcast device expired | ||
207 | * for us, we don't want to go deep idle as we | ||
208 | * know that the IPI is going to arrive right | ||
209 | * away | ||
210 | */ | ||
211 | if (hlt_counter || tick_check_broadcast_expired()) { | ||
203 | local_irq_enable(); | 212 | local_irq_enable(); |
204 | cpu_relax(); | 213 | cpu_relax(); |
205 | } else if (!need_resched()) { | 214 | } else if (!need_resched()) { |