diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-12-09 22:22:40 -0800 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-12-09 22:22:40 -0800 |
| commit | 5d43889c07bb38694742936aa70d1187c012e198 (patch) | |
| tree | 73809dddae39ae3b746396e9779142dbd1973f33 /kernel/cpu | |
| parent | 95f75e91588afecfb0090988393653d21f5d1f91 (diff) | |
| parent | 374b105797c3d4f29c685f3be535c35f5689b30e (diff) | |
Merge tag 'v3.13-rc3' into for-linus
Merging with the mainline to sync up on changes to serio core.
Diffstat (limited to 'kernel/cpu')
| -rw-r--r-- | kernel/cpu/idle.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/kernel/cpu/idle.c b/kernel/cpu/idle.c index e695c0a0bcb..988573a9a38 100644 --- a/kernel/cpu/idle.c +++ b/kernel/cpu/idle.c @@ -44,7 +44,7 @@ static inline int cpu_idle_poll(void) rcu_idle_enter(); trace_cpu_idle_rcuidle(0, smp_processor_id()); local_irq_enable(); - while (!need_resched()) + while (!tif_need_resched()) cpu_relax(); trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id()); rcu_idle_exit(); @@ -92,8 +92,7 @@ static void cpu_idle_loop(void) if (cpu_idle_force_poll || tick_check_broadcast_expired()) { cpu_idle_poll(); } else { - current_clr_polling(); - if (!need_resched()) { + if (!current_clr_polling_and_test()) { stop_critical_timings(); rcu_idle_enter(); arch_cpu_idle(); @@ -103,9 +102,16 @@ static void cpu_idle_loop(void) } else { local_irq_enable(); } - current_set_polling(); + __current_set_polling(); } arch_cpu_idle_exit(); + /* + * We need to test and propagate the TIF_NEED_RESCHED + * bit here because we might not have send the + * reschedule IPI to idle tasks. + */ + if (tif_need_resched()) + set_preempt_need_resched(); } tick_nohz_idle_exit(); schedule_preempt_disabled(); @@ -129,7 +135,7 @@ void cpu_startup_entry(enum cpuhp_state state) */ boot_init_stack_canary(); #endif - current_set_polling(); + __current_set_polling(); arch_cpu_idle_prepare(); cpu_idle_loop(); } |
