]> git.baikalelectronics.ru Git - kernel.git/commit
cpuidle: menu: allow state 0 to be disabled
authorNicholas Piggin <npiggin@gmail.com>
Mon, 26 Jun 2017 05:38:15 +0000 (15:38 +1000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 29 Jun 2017 20:59:17 +0000 (22:59 +0200)
commit8eece9267a28fd7bf7c9867760336843089ffa1d
tree17e531d2f419ed7a8ec5b611f9c00d3ba0b43915
parentf2aab4495e0bdd2db34b1aa54147e3181bd9aef3
cpuidle: menu: allow state 0 to be disabled

The menu driver does not allow state0 to be disabled completely.
If it is disabled but other enabled states don't meet latency
requirements, it is still used.

Fix this by starting with the first enabled idle state. Fall back
to state 0 if no idle states are enabled (arguably this should be
-EINVAL if it is attempted, but this is the minimal fix).

Acked-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpuidle/governors/menu.c