mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
sched / idle: Drop default_idle_call() fallback from call_cpuidle()
After commit 9c4b2867ed (cpuidle: menu: Fix menu_select() for
CPUIDLE_DRIVER_STATE_START == 0) it is clear that menu_select()
cannot return negative values. Moreover, ladder_select_state()
will never return a negative value too, so make find_deepest_state()
return non-negative values too and drop the default_idle_call()
fallback from call_cpuidle().
This eliminates one branch from the idle loop and makes the governors
and find_deepest_state() handle the case when all states have been
disabled from sysfs consistently.
Signed-off-by: Rafael J. Wysocki <[email protected]>
Acked-by: Peter Zijlstra (Intel) <[email protected]>
Acked-by: Ingo Molnar <[email protected]>
Tested-by: Sudeep Holla <[email protected]>
This commit is contained in:
parent
10475b34f4
commit
51164251f5
2 changed files with 3 additions and 9 deletions
|
|
@ -79,9 +79,9 @@ static int find_deepest_state(struct cpuidle_driver *drv,
|
|||
bool freeze)
|
||||
{
|
||||
unsigned int latency_req = 0;
|
||||
int i, ret = -ENXIO;
|
||||
int i, ret = 0;
|
||||
|
||||
for (i = 0; i < drv->state_count; i++) {
|
||||
for (i = 1; i < drv->state_count; i++) {
|
||||
struct cpuidle_state *s = &drv->states[i];
|
||||
struct cpuidle_state_usage *su = &dev->states_usage[i];
|
||||
|
||||
|
|
@ -243,7 +243,7 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv,
|
|||
* @drv: the cpuidle driver
|
||||
* @dev: the cpuidle device
|
||||
*
|
||||
* Returns the index of the idle state.
|
||||
* Returns the index of the idle state. The return value must not be negative.
|
||||
*/
|
||||
int cpuidle_select(struct cpuidle_driver *drv, struct cpuidle_device *dev)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue