* [PATCH] cpufreq: intel_pstate: warn if HWP Native mode and OOB mode are both set
@ 2018-07-29 4:14 oceanhe
2018-09-14 9:09 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: oceanhe @ 2018-07-29 4:14 UTC (permalink / raw)
To: srinivas.pandruvada, lenb
Cc: rjw, viresh.kumar, linux-pm, linux-kernel, Ocean He
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);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] cpufreq: intel_pstate: warn if HWP Native mode and OOB mode are both set
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
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2018-09-14 9:09 UTC (permalink / raw)
To: oceanhe, srinivas.pandruvada
Cc: lenb, viresh.kumar, linux-pm, linux-kernel, Ocean He
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?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-14 9:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.