|
@@ -118,6 +118,7 @@ static void enter_freeze_proper(struct cpuidle_driver *drv,
|
|
|
* 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());
|
|
|
/*
|
|
@@ -126,6 +127,7 @@ static void enter_freeze_proper(struct cpuidle_driver *drv,
|
|
|
* critical sections, so tell RCU about that.
|
|
|
*/
|
|
|
RCU_NONIDLE(tick_unfreeze());
|
|
|
+ start_critical_timings();
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -190,7 +192,9 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv,
|
|
|
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);
|