]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: intel_pstate: Fix HWP on boot CPU after system resume
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 2 May 2016 00:27:19 +0000 (02:27 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 2 May 2016 11:48:15 +0000 (13:48 +0200)
commit52551aaf085d87454845978d56503939302bcbff
tree25806e401a76ee786cc923733ed05c17125a1e40
parent06b1fdc230339e5c4cb2bc02e3e4480c504135c6
cpufreq: intel_pstate: Fix HWP on boot CPU after system resume

Commit fdf66d82b4e7e "Update frequencies of policy->cpus only from
->set_policy()" changed the way the intel_pstate driver's ->set_policy
callback updates the HWP (hardware-managed P-states) settings.
A side effect of it is that if those settings are modified on the
boot CPU during system suspend and wakeup, they will never be
restored during subsequent system resume.

To address this problem, allow cpufreq drivers that don't provide
->target or ->target_index callbacks to use ->suspend and ->resume
callbacks and add a ->resume callback to intel_pstate to restore
the HWP settings on the CPUs that belong to the given policy.

Fixes: fdf66d82b4e7e "Update frequencies of policy->cpus only from ->set_policy()"
Tested-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/cpufreq.c
drivers/cpufreq/intel_pstate.c