[PATCH 0/1] cpufreq/amd-pstate: Prevent active mode on systems without EPP support
From: Marco Scardovi
Date: Wed Jun 03 2026 - 04:25:48 EST
Hi all,
Mario, I've made the actual changes you have requested me on bugzilla for
https://bugzilla.kernel.org/show_bug.cgi?id=221473 . Let me know if it sits
right with you.
Prevent the amd-pstate driver from loading in EPP-reliant "active" mode on
systems without Collaborative Processor Performance Control (CPPC) Energy
Performance Preference (EPP) support (such as Zen 2 and older processors).
Zen 2 and older processors do not support EPP. Loading the driver in active
mode on these systems pins the CPU frequency to the lowest non-linear
frequency (1.7GHz).
To resolve this:
- Unconditionally probe EPP support during driver initialization via a new
amd_pstate_epp_supported() helper, which queries cppc_get_epp_perf() on
the first online CPU.
- Lack of ENERGY_PERF support or any error from cppc_get_epp_perf() causes
EPP to be treated as unsupported.
- Cache EPP support to avoid repeated capability checks during mode switches.
- Fall back to passive mode at boot if EPP is unsupported.
- Reject runtime switches to active mode with -ENODEV.
Please review and provide feedback.
Thanks,
Marco
Marco Scardovi (1):
cpufreq/amd-pstate: Prevent active mode on systems without EPP support
drivers/cpufreq/amd-pstate.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
--
2.54.0