From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Yu Chen <yu.c.chen@intel.com>
Cc: Len Brown <lenb@kernel.org>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
Viresh Kumar <viresh.kumar@linaro.org>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] cpufreq: intel_pstate: enable HWP after resumed
Date: Thu, 08 Feb 2018 11:12:05 +0100 [thread overview]
Message-ID: <5530967.sVKap31zK9@aspire.rjw.lan> (raw)
In-Reply-To: <7ddf56d88ed43701cd498fd42d1ae75e4eea1340.1517192577.git.yu.c.chen@intel.com>
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.
next prev parent reply other threads:[~2018-02-08 10:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-29 2:26 [PATCH 1/2] ACPI: processor_perflib: Do not send _PPC change notification if not ready Yu Chen
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 message]
2018-02-08 9:58 ` [PATCH 1/2] ACPI: processor_perflib: Do not send _PPC change notification if not ready Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5530967.sVKap31zK9@aspire.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=viresh.kumar@linaro.org \
--cc=yu.c.chen@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®