Skip to content

Commit b02d2cf

Browse files
committed
Merge tag 'amd-pstate-v6.11-2024-09-04' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux
Pull an amd-pstate fix for 6.11 from Mario Limonciello: "second round of amd-pstate fixes for 6.11: * Fix an incorrect warning emitted on processors that don't support X86_FEATURE_CPPC." * tag 'amd-pstate-v6.11-2024-09-04' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux: cpufreq/amd-pstate: Remove warning for X86_FEATURE_CPPC on certain Zen models
2 parents 431c164 + 9c68a3b commit b02d2cf

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

drivers/cpufreq/amd-pstate.c

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1834,20 +1834,34 @@ static bool amd_cppc_supported(void)
18341834
}
18351835

18361836
/*
1837-
* If the CPPC feature is disabled in the BIOS for processors that support MSR-based CPPC,
1838-
* the AMD Pstate driver may not function correctly.
1839-
* Check the CPPC flag and display a warning message if the platform supports CPPC.
1840-
* Note: below checking code will not abort the driver registeration process because of
1841-
* the code is added for debugging purposes.
1837+
* If the CPPC feature is disabled in the BIOS for processors
1838+
* that support MSR-based CPPC, the AMD Pstate driver may not
1839+
* function correctly.
1840+
*
1841+
* For such processors, check the CPPC flag and display a
1842+
* warning message if the platform supports CPPC.
1843+
*
1844+
* Note: The code check below will not abort the driver
1845+
* registration process because of the code is added for
1846+
* debugging purposes. Besides, it may still be possible for
1847+
* the driver to work using the shared-memory mechanism.
18421848
*/
18431849
if (!cpu_feature_enabled(X86_FEATURE_CPPC)) {
1844-
if (cpu_feature_enabled(X86_FEATURE_ZEN1) || cpu_feature_enabled(X86_FEATURE_ZEN2)) {
1845-
if (c->x86_model > 0x60 && c->x86_model < 0xaf)
1850+
if (cpu_feature_enabled(X86_FEATURE_ZEN2)) {
1851+
switch (c->x86_model) {
1852+
case 0x60 ... 0x6F:
1853+
case 0x80 ... 0xAF:
18461854
warn = true;
1847-
} else if (cpu_feature_enabled(X86_FEATURE_ZEN3) || cpu_feature_enabled(X86_FEATURE_ZEN4)) {
1848-
if ((c->x86_model > 0x10 && c->x86_model < 0x1F) ||
1849-
(c->x86_model > 0x40 && c->x86_model < 0xaf))
1855+
break;
1856+
}
1857+
} else if (cpu_feature_enabled(X86_FEATURE_ZEN3) ||
1858+
cpu_feature_enabled(X86_FEATURE_ZEN4)) {
1859+
switch (c->x86_model) {
1860+
case 0x10 ... 0x1F:
1861+
case 0x40 ... 0xAF:
18501862
warn = true;
1863+
break;
1864+
}
18511865
} else if (cpu_feature_enabled(X86_FEATURE_ZEN5)) {
18521866
warn = true;
18531867
}

0 commit comments

Comments
 (0)