mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
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 Change-Id: I82b822296d06b122e3f154b2c8af2128136023d5 Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
This commit is contained in:
parent
f0b280c395
commit
bdfb11230b
|
|
@ -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
Block a user