mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
lpm-levels: Read next hrtimer event after tick_nohz_idle_stop_tick()
idle_tick is a periodic timer which sends the interrupt to cpu for every jiffy. If next event is read before stopping the cpu idle_tick it gives the next tick expiry time as the next event. Current logic reading the cpu next event time before stopping the idle tick gives shallower sleep length recorded. This prevents cluster low power mode to get selected since next wakeup is seen either very near to current time or as already expired. Fix this to read next event after idle_tick has been stopped. Change-Id: I8016c7911dc48450668a8a6bc7a6d01d4423da32 Signed-off-by: Raghavendra Kakarla <rkakarla@codeaurora.org>
This commit is contained in:
parent
a92558f282
commit
8000490ae5
1 changed files with 3 additions and 3 deletions
|
|
@ -524,9 +524,6 @@ static int cpu_power_select(struct cpuidle_device *dev,
|
|||
uint32_t min_residency, max_residency;
|
||||
struct power_params *pwr_params;
|
||||
|
||||
/* Read the timer from the CPU that is entering idle */
|
||||
cpu->next_hrtimer = tick_nohz_get_next_hrtimer();
|
||||
|
||||
if (lpm_disallowed(sleep_us, dev->cpu))
|
||||
goto done_select;
|
||||
|
||||
|
|
@ -1262,6 +1259,9 @@ static int lpm_cpuidle_enter(struct cpuidle_device *dev,
|
|||
uint64_t start_time = ktime_to_ns(start), end_time;
|
||||
int ret = -EBUSY;
|
||||
|
||||
/* Read the timer from the CPU that is entering idle */
|
||||
cpu->next_hrtimer = tick_nohz_get_next_hrtimer();
|
||||
|
||||
cpu_prepare(cpu, idx, true);
|
||||
cluster_prepare(cpu->parent, cpumask, idx, true, start_time);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue