]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cpufreq/amd-pstate: Add support for the "Requested CPU Min frequency" BIOS option
authorDhananjay Ugwekar <dhananjay.ugwekar@amd.com>
Mon, 28 Apr 2025 07:16:24 +0000 (07:16 +0000)
committerMario Limonciello <mario.limonciello@amd.com>
Mon, 28 Apr 2025 21:09:35 +0000 (16:09 -0500)
commit608a76b65288698677843d2f22418e03391ef95f
tree9d1f762b229a052fc7f7842c533335a4567efc3a
parent98b52c6b0b528764b454350a11c53f757304afbc
cpufreq/amd-pstate: Add support for the "Requested CPU Min frequency" BIOS option

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 by the PMFW as min_perf in
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.

Signed-off-by: Dhananjay Ugwekar <dhananjay.ugwekar@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20250428071623.4309-1-dhananjay.ugwekar@amd.com
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
drivers/cpufreq/amd-pstate.c
drivers/cpufreq/amd-pstate.h