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
commit35b61edb41ffee58711850e76215b852386ddb10 (patch)
tree781f01d855ca8185dc071bddd89282655f73fdcf
parent80bbe9f273a38f83ecfc50fe384a57f8428887bd (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 <[email protected]> Cc: John Stultz <[email protected]> Cc: Arjan van de Veen <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected]
-rw-r--r--arch/x86/kernel/process.c12
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)
local_touch_nmi();
local_irq_disable();
+ /*
+ * We detected in the wakeup path that the
+ * tick broadcast device expired for us, but
+ * we raced with the other CPU and came back
+ * here before it was able to fire the IPI.
+ * No point in going idle.
+ */
+ if (tick_check_broadcast_expired()) {
+ local_irq_enable();
+ continue;
+ }
+
enter_idle();
/* Don't trace irqs off for idle */