lkml.org 
[lkml]   [2016]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cpufreq: intel_pstate: Fix HWP on boot CPU after system resume
On 02-05-16, 02:27, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Commit 41cfd64cf49fc "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: 41cfd64cf49fc "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>
> ---
>
> Note: We've tried to address that issue by adding syscore_ops to
> intel_pstate and restoring the boot CPU's HWP setting from a
> syscore resume, but that turns out to be too early (apparently,
> the processor is not ready for that at that point).
>
> ---
> drivers/cpufreq/cpufreq.c | 28 ++++++++++++++++------------
> drivers/cpufreq/intel_pstate.c | 12 ++++++++++--
> 2 files changed, 26 insertions(+), 14 deletions(-)

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

--
viresh

\
 
 \ /
  Last update: 2016-05-02 04:21    [W:0.033 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site