Skip to content

Commit 3870a44

Browse files
superm1rafaeljw
authored andcommitted
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>
1 parent 3d13058 commit 3870a44

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/cpufreq/powernow-k8.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,14 +1172,14 @@ static int powernowk8_init(void)
11721172
unsigned int i, supported_cpus = 0;
11731173
int ret;
11741174

1175+
if (!x86_match_cpu(powernow_k8_ids))
1176+
return -ENODEV;
1177+
11751178
if (boot_cpu_has(X86_FEATURE_HW_PSTATE)) {
11761179
__request_acpi_cpufreq();
11771180
return -ENODEV;
11781181
}
11791182

1180-
if (!x86_match_cpu(powernow_k8_ids))
1181-
return -ENODEV;
1182-
11831183
cpus_read_lock();
11841184
for_each_online_cpu(i) {
11851185
smp_call_function_single(i, check_supported_cpu, &ret, 1);

0 commit comments

Comments
 (0)