aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2011-01-10 21:56:31 -0800
committerH. Peter Anvin <hpa@linux.intel.com>2011-01-10 21:56:31 -0800
commita10e8c46fb8efaa92de0ab47b0eac16923cba3c0 (patch)
treee45bf0ff1318243843f9adee587815126f256773
parentb20a590790a1c1199e53de54d162498687b0891c (diff)
downloadmrst-s0i3-test-a10e8c46fb8efaa92de0ab47b0eac16923cba3c0.tar.gz
mrst-s0i3-test-a10e8c46fb8efaa92de0ab47b0eac16923cba3c0.tar.xz
mrst-s0i3-test-a10e8c46fb8efaa92de0ab47b0eac16923cba3c0.zip
s0i3: Suppress S0i3 if a PMU command is hanging
It's unclear if it's safe to try to enter S0i3 if there is already pending PMU command, so assume it is not.
-rw-r--r--drivers/idle/mrst_s0i3.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/idle/mrst_s0i3.c b/drivers/idle/mrst_s0i3.c
index e6bea813b0c..30e39226651 100644
--- a/drivers/idle/mrst_s0i3.c
+++ b/drivers/idle/mrst_s0i3.c
@@ -75,17 +75,18 @@ int mrst_check_state_availability(struct cpuidle_device *dev)
int cpu = smp_processor_id();
/*
- * If there is another CPU running, the GPU is active or the PMU
- * is uninitialized, we cannot enter S0i3
+ * If there is another CPU running, the GPU is active,
+ * the PMU is uninitialized, or there is a still-unprocessed
+ * PMU command, we cannot enter S0i3.
*/
- if (!pmu_reg || !cpumask_equal(cpu_online_mask, cpumask_of(cpu)))
+ if (!pmu_reg || !cpumask_equal(cpu_online_mask, cpumask_of(cpu)) ||
+ s0i3_pmu_command_pending)
dev->states[5].flags |= CPUIDLE_FLAG_IGNORE;
else
dev->states[5].flags &= ~CPUIDLE_FLAG_IGNORE;
/*
- * If there is a pending PMU command, we cannot enter C6,
- * demote to C4.
+ * If there is a pending PMU command, we cannot enter C6.
*/
if (s0i3_pmu_command_pending)
dev->states[4].flags |= CPUIDLE_FLAG_IGNORE;