diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-04-30 18:14:04 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-04-30 18:14:04 -0400 |
commit | 3836785a1bdcd6706c68ad46bf53adc0b057b310 (patch) | |
tree | 874d51f7408229396b15dd1cbe76e0cc52744b87 /drivers/cpuidle/governors | |
parent | 52c324f8a87b336496d0f5e9d8dff1aa32bb08cd (diff) |
cpuidle / menu: Return (-1) if there are no suitable states
If there is a PM QoS latency limit and all of the sufficiently shallow
C-states are disabled, the cpuidle menu governor returns 0 which on
some systems is CPUIDLE_DRIVER_STATE_START and shouldn't be returned
if that C-state has been disabled.
Fix the issue by modifying the menu governor to return (-1) in such
situations.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpuidle/governors')
-rw-r--r-- | drivers/cpuidle/governors/menu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c index 71b523293354..3ca15a8cbaa8 100644 --- a/drivers/cpuidle/governors/menu.c +++ b/drivers/cpuidle/governors/menu.c | |||
@@ -296,7 +296,7 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev) | |||
296 | data->needs_update = 0; | 296 | data->needs_update = 0; |
297 | } | 297 | } |
298 | 298 | ||
299 | data->last_state_idx = 0; | 299 | data->last_state_idx = CPUIDLE_DRIVER_STATE_START - 1; |
300 | 300 | ||
301 | /* Special case when user has set very strict latency requirement */ | 301 | /* Special case when user has set very strict latency requirement */ |
302 | if (unlikely(latency_req == 0)) | 302 | if (unlikely(latency_req == 0)) |