diff options
author | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2016-07-19 19:52:01 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-07-21 08:29:30 -0400 |
commit | da7de91c3e237f3ace1aa29b82c69702dc0176c5 (patch) | |
tree | f98877f23dd6ac4897d30dfce2ad328c0b48126e | |
parent | bc95a454b6dcf6aa464deef86e18c1770b8682b8 (diff) |
cpufreq: intel_pstate: Check cpuid for MSR_HWP_INTERRUPT
The MSR MSR_HWP_INTERRUPT is valid only when CPUID.06H:EAX[8] = 1, so
check for feature before accessing this MSR.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/cpufreq/intel_pstate.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 9c8a78f9ddce..d8028def199d 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c | |||
@@ -806,7 +806,8 @@ static void __init intel_pstate_sysfs_expose_params(void) | |||
806 | static void intel_pstate_hwp_enable(struct cpudata *cpudata) | 806 | static void intel_pstate_hwp_enable(struct cpudata *cpudata) |
807 | { | 807 | { |
808 | /* First disable HWP notification interrupt as we don't process them */ | 808 | /* First disable HWP notification interrupt as we don't process them */ |
809 | wrmsrl_on_cpu(cpudata->cpu, MSR_HWP_INTERRUPT, 0x00); | 809 | if (static_cpu_has(X86_FEATURE_HWP_NOTIFY)) |
810 | wrmsrl_on_cpu(cpudata->cpu, MSR_HWP_INTERRUPT, 0x00); | ||
810 | 811 | ||
811 | wrmsrl_on_cpu(cpudata->cpu, MSR_PM_ENABLE, 0x1); | 812 | wrmsrl_on_cpu(cpudata->cpu, MSR_PM_ENABLE, 0x1); |
812 | } | 813 | } |