diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2014-09-30 00:03:17 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-09-30 15:02:34 -0400 |
commit | b1b12babe3b72cfb08b875245e5a5d7c2747c772 (patch) | |
tree | 75fe780417f1cf8a6fc00b835f94e80e0452b15c | |
parent | d62dbf77f7dfaa6fb455b4b9828069a11965929c (diff) |
cpufreq: update 'cpufreq_suspended' after stopping governors
Commit 8e30444e1530 ("cpufreq: fix cpufreq suspend/resume for intel_pstate")
introduced a bug where the governors wouldn't be stopped anymore for
->target{_index}() drivers during suspend. This happens because
'cpufreq_suspended' is updated before stopping the governors during suspend
and due to this __cpufreq_governor() would return early due to this check:
/* Don't start any governor operations if we are entering suspend */
if (cpufreq_suspended)
return 0;
Fixes: 8e30444e1530 ("cpufreq: fix cpufreq suspend/resume for intel_pstate")
Cc: 3.15+ <stable@vger.kernel.org> # 3.15+: 8e30444e1530 "cpufreq: fix cpufreq suspend/resume for intel_pstate"
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 6e93e7f98358..61190f6b4829 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -1658,10 +1658,8 @@ void cpufreq_suspend(void) | |||
1658 | if (!cpufreq_driver) | 1658 | if (!cpufreq_driver) |
1659 | return; | 1659 | return; |
1660 | 1660 | ||
1661 | cpufreq_suspended = true; | ||
1662 | |||
1663 | if (!has_target()) | 1661 | if (!has_target()) |
1664 | return; | 1662 | goto suspend; |
1665 | 1663 | ||
1666 | pr_debug("%s: Suspending Governors\n", __func__); | 1664 | pr_debug("%s: Suspending Governors\n", __func__); |
1667 | 1665 | ||
@@ -1674,6 +1672,9 @@ void cpufreq_suspend(void) | |||
1674 | pr_err("%s: Failed to suspend driver: %p\n", __func__, | 1672 | pr_err("%s: Failed to suspend driver: %p\n", __func__, |
1675 | policy); | 1673 | policy); |
1676 | } | 1674 | } |
1675 | |||
1676 | suspend: | ||
1677 | cpufreq_suspended = true; | ||
1677 | } | 1678 | } |
1678 | 1679 | ||
1679 | /** | 1680 | /** |