]> 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)
commitf330d6c67444c66353d708ad0febf8dd24b1751c
tree25806e401a76ee786cc923733ed05c17125a1e40
parent25a88ba15587c89e69137fa2ae92bc28bbfcbdf7
cpufreq: intel_pstate: Fix HWP on boot CPU after system resume

Commit 0d684e8c1200b "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: 0d684e8c1200b "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