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 <[email protected]>
Acked-by: Viresh Kumar <[email protected]>
Reviewed-by: Huang Rui <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
This commit is contained in:
Mario Limonciello authored and Rafael J. Wysocki committed 2022-03-17 14:54:11 +01:00
1 parent 3d13058ed2
commit 3870a44d50
1 file changed
+3 -3
+3 -3
View File
@@ -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);