]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cpufreq/amd-pstate: Always write EPP value when updating perf
authorMario Limonciello <mario.limonciello@amd.com>
Mon, 9 Dec 2024 18:52:45 +0000 (12:52 -0600)
committerMario Limonciello <mario.limonciello@amd.com>
Wed, 11 Dec 2024 16:44:53 +0000 (10:44 -0600)
commitfff395796917ac3fe3b4c4607cb74a8dbdc17593
treefb14a4c81a30d41d10cc097b557efc655468dc1b
parentb3781f30bfcfd7db12de2595adb01779e565e1c6
cpufreq/amd-pstate: Always write EPP value when updating perf

For MSR systems the EPP value is in the same register as perf targets
and so divding them into two separate MSR writes is wasteful.

In msr_update_perf(), update both EPP and perf values in one write to
MSR_AMD_CPPC_REQ, and cache them if successful.

To accomplish this plumb the EPP value into the update_perf call and
modify all its callers to check the return value.

As this unifies calls, ensure that the MSR write is necessary before
flushing a write out. Also drop the comparison from the passive flow
tracing.

Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Link: https://lore.kernel.org/r/20241209185248.16301-13-mario.limonciello@amd.com
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
drivers/cpufreq/amd-pstate-trace.h
drivers/cpufreq/amd-pstate.c