summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/powernow-k8.c
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@amd.com>2022-03-17 00:55:48 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-03-17 16:54:11 +0300
commit3870a44d50feeb5118a2698617d251123d9cde4c (patch)
tree26e82b44812547d7507ea41a6884c9dc7e7821ab /drivers/cpufreq/powernow-k8.c
parent3d13058ed2a6d0ddb55a45a979acc49a845be874 (diff)
downloadlinux-3870a44d50feeb5118a2698617d251123d9cde4c.tar.xz
cpufreq: powernow-k8: Re-order the init checks
The powernow-k8 driver will do checks at startup that the current active driver is acpi-cpufreq and show a warning when they're not expected. Because of this the following warning comes up on systems that support amd-pstate and compiled in both drivers: `WTF driver: amd-pstate` The systems that support powernow-k8 will not support amd-pstate, so re-order the checks to validate the CPU model number first to avoid this warning being displayed on modern SOCs. Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/powernow-k8.c')
-rw-r--r--drivers/cpufreq/powernow-k8.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/cpufreq/powernow-k8.c b/drivers/cpufreq/powernow-k8.c
index 12ab4014af71..d289036beff2 100644
--- a/drivers/cpufreq/powernow-k8.c
+++ b/drivers/cpufreq/powernow-k8.c
@@ -1172,14 +1172,14 @@ static int powernowk8_init(void)
unsigned int i, supported_cpus = 0;
int ret;
+ if (!x86_match_cpu(powernow_k8_ids))
+ return -ENODEV;
+
if (boot_cpu_has(X86_FEATURE_HW_PSTATE)) {
__request_acpi_cpufreq();
return -ENODEV;
}
- if (!x86_match_cpu(powernow_k8_ids))
- return -ENODEV;
-
cpus_read_lock();
for_each_online_cpu(i) {
smp_call_function_single(i, check_supported_cpu, &ret, 1);