[PATCH v3 0/2] Add support for "Requested CPU Min Frequency" BIOS option

Dhananjay Ugwekar posted 2 patches 7 months, 2 weeks ago
drivers/cpufreq/amd-pstate.c | 99 ++++++++++++++++++++++++++++--------
drivers/cpufreq/amd-pstate.h |  2 +
2 files changed, 80 insertions(+), 21 deletions(-)
[PATCH v3 0/2] Add support for "Requested CPU Min Frequency" BIOS option
Posted by Dhananjay Ugwekar 7 months, 2 weeks ago
Zen 4 AMD EPYC systems and above have a "Requested CPU Min Frequency" 
BIOS option which allows the user to set an initial lower frequency 
limit. This limit can later be overridden by the user by writing to the
sysfs file "scaling_min_freq".

Initialize lower frequency limit to the "Requested CPU Min frequency" 
BIOS option (if it is set) value as part of the driver->init() 
callback. The BIOS specified value is passed as min_perf in the CPPC_REQ 
MSR. To ensure that we don't mistake a stale min_perf value in CPPC_REQ 
value as the "Requested CPU Min frequency" during a kexec wakeup, reset 
the CPPC_REQ.min_perf value back to the BIOS specified one in the offline,
exit and suspend callbacks. 

amd_pstate_target() and amd_pstate_epp_update_limit() which are invoked 
as part of the resume() and online() callbacks will take care of restoring
the CPPC_REQ back to the correct values.

Dhananjay Ugwekar (2):
  cpufreq/amd-pstate: Add offline, online and suspend callbacks for
    amd_pstate_driver
  cpufreq/amd-pstate: Add support for the "Requested CPU Min frequency"
    BIOS option

 drivers/cpufreq/amd-pstate.c | 99 ++++++++++++++++++++++++++++--------
 drivers/cpufreq/amd-pstate.h |  2 +
 2 files changed, 80 insertions(+), 21 deletions(-)

-- 
2.34.1