ANDROID: cpuidle: Allow for an early exit from cpuidle_enter_state()
Vendor hook may modify index to negative to force an early exit from idle entry. Add support for the same. Bug: 192436062 Bug: 195914333 Change-Id: I82b822296d06b122e3f154b2c8af2128136023d5 Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
This commit is contained in:
parent
0fd079285d
commit
132d8ef617
|
@ -212,6 +212,9 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv,
|
||||||
* broadcast must be assigned after the vendor hook.
|
* broadcast must be assigned after the vendor hook.
|
||||||
*/
|
*/
|
||||||
trace_android_vh_cpu_idle_enter(&index, dev);
|
trace_android_vh_cpu_idle_enter(&index, dev);
|
||||||
|
if (index < 0)
|
||||||
|
return index;
|
||||||
|
|
||||||
target_state = &drv->states[index];
|
target_state = &drv->states[index];
|
||||||
broadcast = !!(target_state->flags & CPUIDLE_FLAG_TIMER_STOP);
|
broadcast = !!(target_state->flags & CPUIDLE_FLAG_TIMER_STOP);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue