From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: oceanhe@zoho.com.cn, srinivas.pandruvada@linux.intel.com
Cc: lenb@kernel.org, viresh.kumar@linaro.org,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
Ocean He <hehy1@lenovo.com>
Subject: Re: [PATCH] cpufreq: intel_pstate: warn if HWP Native mode and OOB mode are both set
Date: Fri, 14 Sep 2018 11:09:18 +0200 [thread overview]
Message-ID: <13141827.DFN6g7be8o@aspire.rjw.lan> (raw)
In-Reply-To: <1532837696-11505-1-git-send-email-oceanhe@zoho.com.cn>
On Sunday, July 29, 2018 6:14:56 AM CEST oceanhe@zoho.com.cn wrote:
> From: Ocean He <hehy1@lenovo.com>
>
> Refer to Intel HWPM Compliance Guide (Document Number: 566474): Bit[6] or
> bit[8] of MSR MISC_PWR_MGMT is set only when BIOS select either HWP Native
> mode or HWP OOB mode. Bit[6] and bit[8] cannot be set both at the same
> time.
>
> Add a warning message if intel_pstate detects both HWP Native mode and
> HWP OOB mode are set at the same time.
>
> Signed-off-by: Ocean He <hehy1@lenovo.com>
> ---
> drivers/cpufreq/intel_pstate.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
> index 3c39712..678d3f2 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -2455,8 +2455,12 @@ static bool __init intel_pstate_platform_pwr_mgmt_exists(void)
> id = x86_match_cpu(intel_pstate_cpu_oob_ids);
> if (id) {
> rdmsrl(MSR_MISC_PWR_MGMT, misc_pwr);
> - if ( misc_pwr & (1 << 8))
> + if (misc_pwr & (1 << 8)) {
> + if (misc_pwr & (1 << 6))
> + pr_warn(FW_WARN
> + "HWP Native mode and OOB mode cannot be set both at the same time.\n");
> return true;
> + }
> }
>
> idx = acpi_match_platform_list(plat_info);
>
Srinivas, what do you think about this one?
prev parent reply other threads:[~2018-09-14 9:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-29 4:14 [PATCH] cpufreq: intel_pstate: warn if HWP Native mode and OOB mode are both set oceanhe
2018-09-14 9:09 ` Rafael J. Wysocki [this message]
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=13141827.DFN6g7be8o@aspire.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=hehy1@lenovo.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=oceanhe@zoho.com.cn \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=viresh.kumar@linaro.org \
/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;
as well as URLs for NNTP newsgroup(s).