summaryrefslogtreecommitdiffstats
path: root/drivers/idle
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2015-05-27 17:11:37 -0400
committerLen Brown <len.brown@intel.com>2015-07-26 12:43:45 -0400
commit7dd0e0af64afe4aa08ccdd167f64bd007f09b515 (patch)
treef09c6ef7092df934e512aaf1ef2fd628c9f91fff /drivers/idle
parent26ae19a3883c9d595e9100fd10b856a7cf1a949a (diff)
downloadlinux-stable-7dd0e0af64afe4aa08ccdd167f64bd007f09b515.tar.gz
linux-stable-7dd0e0af64afe4aa08ccdd167f64bd007f09b515.tar.bz2
linux-stable-7dd0e0af64afe4aa08ccdd167f64bd007f09b515.zip
intel_idle: allow idle states to be freeze-mode specific
intel_idle uses a NULL "enter" field in a cpuidle state to recognize the invalid entry terminating a variable-length array. Linux-4.0 added support for the system-wide "freeze" state in cpuidle drivers via the new "enter_freeze" field. The natural way to expose a deep idle state for freeze, but not for run-time idle is to supply "enter_freeze" without "enter"; so we update the driver to accept such states. Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/idle')
-rw-r--r--drivers/idle/intel_idle.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index 2a36a95d95cf..008e943d224d 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -965,7 +965,8 @@ static int __init intel_idle_cpuidle_driver_init(void)
for (cstate = 0; cstate < CPUIDLE_STATE_MAX; ++cstate) {
int num_substates, mwait_hint, mwait_cstate;
- if (cpuidle_state_table[cstate].enter == NULL)
+ if ((cpuidle_state_table[cstate].enter == NULL) &&
+ (cpuidle_state_table[cstate].enter_freeze == NULL))
break;
if (cstate + 1 > max_cstate) {