summaryrefslogtreecommitdiffstats
path: root/kernel/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/cpu')
-rw-r--r--kernel/cpu/idle.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/kernel/cpu/idle.c b/kernel/cpu/idle.c
index 168cf40..8b86c0c 100644
--- a/kernel/cpu/idle.c
+++ b/kernel/cpu/idle.c
@@ -76,7 +76,16 @@ static void cpu_idle_loop(void)
local_irq_disable();
arch_cpu_idle_enter();
- if (cpu_idle_force_poll) {
+ /*
+ * 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 (cpu_idle_force_poll || tick_check_broadcast_expired()) {
cpu_idle_poll();
} else {
current_clr_polling();
OpenPOWER on IntegriCloud