===================================================================
@@ -220,13 +220,17 @@ static void do_idle(void)
*/
__current_set_polling();
- tick_nohz_idle_enter();
+ tick_nohz_idle_prepare();
while (!need_resched()) {
check_pgt_cache();
rmb();
if (cpu_is_offline(cpu)) {
+ local_irq_disable();
+ tick_nohz_idle_go_idle(true);
+ local_irq_enable();
+
cpuhp_report_idle_dead();
arch_cpu_idle_dead();
}
@@ -240,10 +244,13 @@ static void do_idle(void)
* 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())
+ if (cpu_idle_force_poll || tick_check_broadcast_expired()) {
+ tick_nohz_idle_go_idle(false);
cpu_idle_poll();
- else
+ } else {
+ tick_nohz_idle_go_idle(true);
cpuidle_idle_call();
+ }
arch_cpu_idle_exit();
}
===================================================================
@@ -1000,7 +1000,7 @@ void tick_nohz_irq_exit(void)
struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched);
if (ts->inidle)
- __tick_nohz_idle_enter(ts, true);
+ __tick_nohz_idle_enter(ts, false);
else
tick_nohz_full_update_tick(ts);
}