[patch 6/7] arm: Use tick broadcast expired check

From: Thomas Gleixner
Date: Wed Mar 06 2013 - 06:18:52 EST


Avoid going back into deep idle if the tick broadcast IPI is about to
fire.

Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---
arch/arm/kernel/process.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

Index: tip/arch/arm/kernel/process.c
===================================================================
--- tip.orig/arch/arm/kernel/process.c
+++ tip/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()) {


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/