Skip to content

Commit

Permalink
x86: Use tick broadcast expired check
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Thomas Gleixner committed Mar 13, 2013
1 parent 80bbe9f commit 35b61ed
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions arch/x86/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 35b61ed

Please sign in to comment.