]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cpufreq/amd-pstate: Overhaul locking
authorMario Limonciello <mario.limonciello@amd.com>
Sat, 7 Dec 2024 05:20:04 +0000 (23:20 -0600)
committerMario Limonciello <mario.limonciello@amd.com>
Thu, 6 Mar 2025 19:01:24 +0000 (13:01 -0600)
commit6f0b13f16f7a214996a8a125080a6a99bda5d1f7
tree6767f07376d1b3ed06e1c96273ee1b1db6f9b239
parent009d1c29a45194212e9310ccd91a19a673908a5c
cpufreq/amd-pstate: Overhaul locking

amd_pstate_cpu_boost_update() and refresh_frequency_limits() both
update the policy state and have nothing to do with the amd-pstate
driver itself.

A global "limits" lock doesn't make sense because each CPU can have
policies changed independently.  Each time a CPU changes values they
will atomically be written to the per-CPU perf member. Drop per CPU
locking cases.

The remaining "global" driver lock is used to ensure that only one
entity can change driver modes at a given time.

Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Reviewed-by: Dhananjay Ugwekar <dhananjay.ugwekar@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
drivers/cpufreq/amd-pstate.c