cpufreq/amd-pstate: Move perf values into a union
authorMario Limonciello <mario.limonciello@amd.com>
Sat, 18 Jan 2025 00:34:38 +0000 (18:34 -0600)
committerMario Limonciello <mario.limonciello@amd.com>
Thu, 6 Mar 2025 19:01:24 +0000 (13:01 -0600)
commit009d1c29a45194212e9310ccd91a19a673908a5c
treef9e97f2e2df90833ea0336211110c031ae03aeae
parenta9b9b4c2a4cdd00428d14914e3c18be3856aba71
cpufreq/amd-pstate: Move perf values into a union

By storing perf values in a union all the writes and reads can
be done atomically, removing the need for some concurrency protections.

While making this change, also drop the cached frequency values,
using inline helpers to calculate them on demand from perf value.

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-ut.c
drivers/cpufreq/amd-pstate.c
drivers/cpufreq/amd-pstate.h