public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Add support for "Requested CPU Min Frequency" BIOS option
@ 2025-04-15 10:21 Dhananjay Ugwekar
  2025-04-15 10:21 ` [PATCH 1/2] cpufreq/amd-pstate: Add offline, online and suspend callbacks for amd_pstate_driver Dhananjay Ugwekar
  2025-04-15 10:21 ` [PATCH 2/2] cpufreq/amd-pstate: Add support for the "Requested CPU Min frequency" BIOS option Dhananjay Ugwekar
  0 siblings, 2 replies; 6+ messages in thread
From: Dhananjay Ugwekar @ 2025-04-15 10:21 UTC (permalink / raw)
  To: gautham.shenoy, mario.limonciello
  Cc: linux-pm, linux-kernel, Dhananjay Ugwekar

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 last sane 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 | 79 ++++++++++++++++++++++++++----------
 drivers/cpufreq/amd-pstate.h |  2 +
 2 files changed, 60 insertions(+), 21 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-04-16  3:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-15 10:21 [PATCH 0/2] Add support for "Requested CPU Min Frequency" BIOS option Dhananjay Ugwekar
2025-04-15 10:21 ` [PATCH 1/2] cpufreq/amd-pstate: Add offline, online and suspend callbacks for amd_pstate_driver Dhananjay Ugwekar
2025-04-15 14:35   ` Mario Limonciello
2025-04-15 10:21 ` [PATCH 2/2] cpufreq/amd-pstate: Add support for the "Requested CPU Min frequency" BIOS option Dhananjay Ugwekar
2025-04-15 20:54   ` Mario Limonciello
2025-04-16  3:29     ` Dhananjay Ugwekar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox