* [PATCH 2/2] cpufreq: intel_pstate: enable HWP after resumed [not found] <d71a6cf7352de5595ac1419000bd72b6d068cce1.1517192577.git.yu.c.chen@intel.com> @ 2018-01-29 2:27 ` Yu Chen 2018-02-08 10:12 ` Rafael J. Wysocki 0 siblings, 1 reply; 2+ messages in thread From: Yu Chen @ 2018-01-29 2:27 UTC (permalink / raw) To: Rafael J. Wysocki, Len Brown, Srinivas Pandruvada Cc: Viresh Kumar, linux-pm, linux-kernel, Yu Chen When maxcpus=1 is appended the BP is responsible for re-enabling the HWP - because currently only the APs invoke intel_pstate_hwp_enable() during their online process - which might put the system into unstable state after resume. Fix this by enabling the HWP explicitly on BP during resume. Reported-by: Doug Smythies <dsmythies@telus.net> Suggested-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Yu Chen <yu.c.chen@intel.com> --- drivers/cpufreq/intel_pstate.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 93a0e88bef76..89f637e8439c 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -779,6 +779,8 @@ static int intel_pstate_hwp_save_state(struct cpufreq_policy *policy) return 0; } +static void intel_pstate_hwp_enable(struct cpudata *cpudata); + static int intel_pstate_resume(struct cpufreq_policy *policy) { if (!hwp_active) @@ -786,6 +788,8 @@ static int intel_pstate_resume(struct cpufreq_policy *policy) mutex_lock(&intel_pstate_limits_lock); + if (!policy->cpu) + intel_pstate_hwp_enable(all_cpu_data[policy->cpu]); all_cpu_data[policy->cpu]->epp_policy = 0; intel_pstate_hwp_set(policy->cpu); -- 2.13.6 ^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2/2] cpufreq: intel_pstate: enable HWP after resumed 2018-01-29 2:27 ` [PATCH 2/2] cpufreq: intel_pstate: enable HWP after resumed Yu Chen @ 2018-02-08 10:12 ` Rafael J. Wysocki 0 siblings, 0 replies; 2+ messages in thread From: Rafael J. Wysocki @ 2018-02-08 10:12 UTC (permalink / raw) To: Yu Chen Cc: Len Brown, Srinivas Pandruvada, Viresh Kumar, linux-pm, linux-kernel On Monday, January 29, 2018 3:27:57 AM CET Yu Chen wrote: > When maxcpus=1 is appended the BP is responsible > for re-enabling the HWP - because currently only > the APs invoke intel_pstate_hwp_enable() during > their online process - which might put the system > into unstable state after resume. > > Fix this by enabling the HWP explicitly on BP during > resume. > > Reported-by: Doug Smythies <dsmythies@telus.net> > Suggested-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> > Signed-off-by: Yu Chen <yu.c.chen@intel.com> > --- > drivers/cpufreq/intel_pstate.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c > index 93a0e88bef76..89f637e8439c 100644 > --- a/drivers/cpufreq/intel_pstate.c > +++ b/drivers/cpufreq/intel_pstate.c > @@ -779,6 +779,8 @@ static int intel_pstate_hwp_save_state(struct cpufreq_policy *policy) > return 0; > } > > +static void intel_pstate_hwp_enable(struct cpudata *cpudata); > + > static int intel_pstate_resume(struct cpufreq_policy *policy) > { > if (!hwp_active) > @@ -786,6 +788,8 @@ static int intel_pstate_resume(struct cpufreq_policy *policy) > > mutex_lock(&intel_pstate_limits_lock); > > + if (!policy->cpu) > + intel_pstate_hwp_enable(all_cpu_data[policy->cpu]); > all_cpu_data[policy->cpu]->epp_policy = 0; > intel_pstate_hwp_set(policy->cpu); > > I've applied this one (with minor modifications) as a temporary measure, but it is based on the CPU0=BP assumption which may not be the case. ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-08 10:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <d71a6cf7352de5595ac1419000bd72b6d068cce1.1517192577.git.yu.c.chen@intel.com>
2018-01-29 2:27 ` [PATCH 2/2] cpufreq: intel_pstate: enable HWP after resumed Yu Chen
2018-02-08 10:12 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).