aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/kernel/process.c11
-rw-r--r--arch/x86/kernel/process.c12
2 files changed, 22 insertions, 1 deletions
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 047d3e40e470..db4ffd09ee23 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -199,7 +199,16 @@ void cpu_idle(void)
199#ifdef CONFIG_PL310_ERRATA_769419 199#ifdef CONFIG_PL310_ERRATA_769419
200 wmb(); 200 wmb();
201#endif 201#endif
202 if (hlt_counter) { 202 /*
203 * In poll mode we reenable interrupts and spin.
204 *
205 * Also if we detected in the wakeup from idle
206 * path that the tick broadcast device expired
207 * for us, we don't want to go deep idle as we
208 * know that the IPI is going to arrive right
209 * away
210 */
211 if (hlt_counter || tick_check_broadcast_expired()) {
203 local_irq_enable(); 212 local_irq_enable();
204 cpu_relax(); 213 cpu_relax();
205 } else if (!need_resched()) { 214 } else if (!need_resched()) {
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 */