* cpuidle mechanism enables interrupts and doing that with timekeeping
         * suspended is generally unsafe.
         */
+       stop_critical_timings();
        drv->states[index].enter_freeze(dev, drv, index);
        WARN_ON(!irqs_disabled());
        /*
         * critical sections, so tell RCU about that.
         */
        RCU_NONIDLE(tick_unfreeze());
+       start_critical_timings();
 }
 
 /**
        trace_cpu_idle_rcuidle(index, dev->cpu);
        time_start = ktime_get();
 
+       stop_critical_timings();
        entered_state = target_state->enter(dev, drv, index);
+       start_critical_timings();
 
        time_end = ktime_get();
        trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, dev->cpu);
 
  */
 void default_idle_call(void)
 {
-       if (current_clr_polling_and_test())
+       if (current_clr_polling_and_test()) {
                local_irq_enable();
-       else
+       } else {
+               stop_critical_timings();
                arch_cpu_idle();
+               start_critical_timings();
+       }
 }
 
 static int call_cpuidle(struct cpuidle_driver *drv, struct cpuidle_device *dev,
                return;
        }
 
-       /*
-        * During the idle period, stop measuring the disabled irqs
-        * critical sections latencies
-        */
-       stop_critical_timings();
-
        /*
         * Tell the RCU framework we are entering an idle section,
         * so no more rcu read side critical sections and one more
                local_irq_enable();
 
        rcu_idle_exit();
-       start_critical_timings();
 }
 
 DEFINE_PER_CPU(bool, cpu_dead_idle);