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 | 35b61edb41ffee58711850e76215b852386ddb10 (patch) | |
tree | 781f01d855ca8185dc071bddd89282655f73fdcf /arch/x86 | |
parent | 80bbe9f273a38f83ecfc50fe384a57f8428887bd (diff) |
x86: 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: John Stultz <john.stultz@linaro.org>
Cc: Arjan van de Veen <arjan@infradead.org>
Cc: x86@kernel.org
Link: http://lkml.kernel.org/r/20130306111537.702278273@linutronix.de
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/process.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 14ae10031ff0..aa524da03bba 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
@@ -336,6 +336,18 @@ void cpu_idle(void) | |||
336 | local_touch_nmi(); | 336 | local_touch_nmi(); |
337 | local_irq_disable(); | 337 | local_irq_disable(); |
338 | 338 | ||
339 | /* | ||
340 | * We detected in the wakeup path that the | ||
341 | * tick broadcast device expired for us, but | ||
342 | * we raced with the other CPU and came back | ||
343 | * here before it was able to fire the IPI. | ||
344 | * No point in going idle. | ||
345 | */ | ||
346 | if (tick_check_broadcast_expired()) { | ||
347 | local_irq_enable(); | ||
348 | continue; | ||
349 | } | ||
350 | |||
339 | enter_idle(); | 351 | enter_idle(); |
340 | 352 | ||
341 | /* Don't trace irqs off for idle */ | 353 | /* Don't trace irqs off for idle */ |