]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
amd-pstate: Add sysfs support for floor_freq and floor_count
authorGautham R. Shenoy <gautham.shenoy@amd.com>
Thu, 26 Mar 2026 11:47:50 +0000 (17:17 +0530)
committerMario Limonciello (AMD) <superm1@kernel.org>
Thu, 2 Apr 2026 16:28:28 +0000 (11:28 -0500)
commitb9f103d0968bc5b33bff1b1eb11c756b2ac07c6c
tree19692a9fa6f045c6ff04b37df0719f5c68d7443f
parent97838281f587a9e98e74b913201f7408214b5999
amd-pstate: Add sysfs support for floor_freq and floor_count

When Floor Performance feature is supported by the platform, expose
two sysfs files:

   * amd_pstate_floor_freq to allow userspace to request the floor
     frequency for each CPU.

   * amd_pstate_floor_count which advertises the number of distinct
     levels of floor frequencies supported on this platform.

Reset the floor_perf to bios_floor_perf in the suspend, offline, and
exit paths, and restore the value to the cached user-request
floor_freq on the resume and online paths mirroring how bios_min_perf
is handled for MSR_AMD_CPPC_REQ.

Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
drivers/cpufreq/amd-pstate.c
drivers/cpufreq/amd-pstate.h