|
@@ -141,13 +141,15 @@ static void cpuidle_idle_call(void)
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|
|
- * Tell the RCU framework we are entering an idle section,
|
|
|
|
- * so no more rcu read side critical sections and one more
|
|
|
|
|
|
+ * The RCU framework needs to be told that we are entering an idle
|
|
|
|
+ * section, so no more rcu read side critical sections and one more
|
|
* step to the grace period
|
|
* step to the grace period
|
|
*/
|
|
*/
|
|
- rcu_idle_enter();
|
|
|
|
|
|
|
|
if (cpuidle_not_available(drv, dev)) {
|
|
if (cpuidle_not_available(drv, dev)) {
|
|
|
|
+ tick_nohz_idle_stop_tick();
|
|
|
|
+ rcu_idle_enter();
|
|
|
|
+
|
|
default_idle_call();
|
|
default_idle_call();
|
|
goto exit_idle;
|
|
goto exit_idle;
|
|
}
|
|
}
|
|
@@ -164,16 +166,26 @@ static void cpuidle_idle_call(void)
|
|
|
|
|
|
if (idle_should_enter_s2idle() || dev->use_deepest_state) {
|
|
if (idle_should_enter_s2idle() || dev->use_deepest_state) {
|
|
if (idle_should_enter_s2idle()) {
|
|
if (idle_should_enter_s2idle()) {
|
|
|
|
+ rcu_idle_enter();
|
|
|
|
+
|
|
entered_state = cpuidle_enter_s2idle(drv, dev);
|
|
entered_state = cpuidle_enter_s2idle(drv, dev);
|
|
if (entered_state > 0) {
|
|
if (entered_state > 0) {
|
|
local_irq_enable();
|
|
local_irq_enable();
|
|
goto exit_idle;
|
|
goto exit_idle;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ rcu_idle_exit();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ tick_nohz_idle_stop_tick();
|
|
|
|
+ rcu_idle_enter();
|
|
|
|
+
|
|
next_state = cpuidle_find_deepest_state(drv, dev);
|
|
next_state = cpuidle_find_deepest_state(drv, dev);
|
|
call_cpuidle(drv, dev, next_state);
|
|
call_cpuidle(drv, dev, next_state);
|
|
} else {
|
|
} else {
|
|
|
|
+ tick_nohz_idle_stop_tick();
|
|
|
|
+ rcu_idle_enter();
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* Ask the cpuidle framework to choose a convenient idle state.
|
|
* Ask the cpuidle framework to choose a convenient idle state.
|
|
*/
|
|
*/
|
|
@@ -240,7 +252,6 @@ static void do_idle(void)
|
|
tick_nohz_idle_restart_tick();
|
|
tick_nohz_idle_restart_tick();
|
|
cpu_idle_poll();
|
|
cpu_idle_poll();
|
|
} else {
|
|
} else {
|
|
- tick_nohz_idle_stop_tick();
|
|
|
|
cpuidle_idle_call();
|
|
cpuidle_idle_call();
|
|
}
|
|
}
|
|
arch_cpu_idle_exit();
|
|
arch_cpu_idle_exit();
|