summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/acpi-cpufreq.c
diff options
context:
space:
mode:
authorStuart Hayes <stuart.w.hayes@gmail.com>2022-12-05 20:57:44 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-12-06 14:12:40 +0300
commit442046328f27e30ce2c830759af89f42e7169bc1 (patch)
tree010a6655ce7c370cfa9dc6dbef7af875fdb76355 /drivers/cpufreq/acpi-cpufreq.c
parentedeba49e39193025cbf1a06ce7a74f136e83664f (diff)
downloadlinux-442046328f27e30ce2c830759af89f42e7169bc1.tar.xz
cpufreq: ACPI: Only set boost MSRs on supported CPUs
Stop trying to set boost MSRs on CPUs that don't support boost. This corrects a bug in the recent patch "Defer setting boost MSRs". Fixes: 13fdbc8b8da6 ("cpufreq: ACPI: Defer setting boost MSRs") Signed-off-by: Stuart Hayes <stuart.w.hayes@gmail.com> Reported-by: Borislav Petkov (AMD) <bp@alien8.de> Tested-by: Borislav Petkov (AMD) <bp@alien8.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/acpi-cpufreq.c')
-rw-r--r--drivers/cpufreq/acpi-cpufreq.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
index 74ef0e05ff7b..78adfb2ffff6 100644
--- a/drivers/cpufreq/acpi-cpufreq.c
+++ b/drivers/cpufreq/acpi-cpufreq.c
@@ -889,7 +889,8 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
if (perf->states[0].core_frequency * 1000 != freq_table[0].frequency)
pr_warn(FW_WARN "P-state 0 is not max freq\n");
- set_boost(policy, acpi_cpufreq_driver.boost_enabled);
+ if (acpi_cpufreq_driver.set_boost)
+ set_boost(policy, acpi_cpufreq_driver.boost_enabled);
return result;