lpm-levels: Fix cpu idle trace and stats event
In the event that the cpu needs to be rescheduled for another task before it enters psci sleep, the stats and trace exit events are considered without the enter events. Fix this issue by moving enter events before the cpu gets scheduled. Change-Id: I8e477c434d218960b48aab4e61cacf99476b607f Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
This commit is contained in:
parent
b378543680
commit
226509c1ee
1 changed files with 3 additions and 2 deletions
|
@ -1026,12 +1026,13 @@ static int lpm_cpuidle_enter(struct cpuidle_device *dev,
|
|||
cpu_prepare(cluster, idx, true);
|
||||
cluster_prepare(cluster, cpumask, idx, true, ktime_to_ns(ktime_get()));
|
||||
|
||||
trace_cpu_idle_enter(idx);
|
||||
lpm_stats_cpu_enter(idx, start_time);
|
||||
|
||||
if (need_resched() || (idx < 0))
|
||||
goto exit;
|
||||
|
||||
BUG_ON(!use_psci);
|
||||
trace_cpu_idle_enter(idx);
|
||||
lpm_stats_cpu_enter(idx, start_time);
|
||||
success = psci_enter_sleep(cluster, idx, true);
|
||||
|
||||
exit:
|
||||
|
|
Loading…
Add table
Reference in a new issue