@@ -53,8 +53,10 @@ static inline int hlt_works(void)
static void poll_idle(void)
{
local_irq_enable();
+ rcu_idle_enter();
while (!need_resched())
cpu_relax();
+ rcu_idle_exit();
}
void default_idle(void)
@@ -66,9 +68,14 @@ void default_idle(void)
set_bl_bit();
if (!need_resched()) {
local_irq_enable();
+ rcu_idle_enter();
cpu_sleep();
- } else
+ rcu_idle_exit();
+ } else {
local_irq_enable();
+ rcu_idle_enter();
+ rcu_idle_exit();
+ }
set_thread_flag(TIF_POLLING_NRFLAG);
clear_bl_bit();
@@ -90,7 +97,6 @@ void cpu_idle(void)
/* endless idle loop with no priority at all */
while (1) {
tick_nohz_idle_enter();
- rcu_idle_enter();
while (!need_resched()) {
check_pgt_cache();
@@ -112,7 +118,6 @@ void cpu_idle(void)
start_critical_timings();
}
- rcu_idle_exit();
tick_nohz_idle_exit();
preempt_enable_no_resched();
schedule();