summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorMarco Scardovi <scardracs@disroot.org>2026-06-09 09:29:03 +0200
committerMario Limonciello <superm1@kernel.org>2026-07-22 13:45:48 -0500
commit57476909c3000a04e84a1d6018d63ba1b2aa20ab (patch)
tree469153c2b43975a169280e400c833e77832080d8 /tools/perf/scripts/python/bin
parent8d31bb1451643f328db0cea0e21e63ef54b4faf2 (diff)
cpufreq/amd-pstate: Fix EPP return type and handle errors during initialization
Currently, the EPP getter helper functions (msr_get_epp, shmem_get_epp, and the static call wrapper amd_pstate_get_epp) return u8 or s16. This makes it difficult to correctly propagate negative error values returned by the underlying MSR read or CPPC helpers (such as rdmsrq_on_cpu or cppc_get_epp_perf). Modify the return type of these functions to int, allowing them to return negative error codes properly. Additionally, in amd_pstate_epp_cpu_init(), fetch the firmware-programmed default EPP value and validate it before assigning it to the EPP variables. If amd_pstate_get_epp() returns an error code, propagate the error and abort the CPU initialization to prevent subsequent configuration failures. Fixes: 555bbe67a622 ("cpufreq/amd-pstate: Convert all perf values to u8") Assisted-by: Antigravity:gemini-3.5-flash Reviewed-by: K Prateek Nayak <kprateek.nayak@amd.com> Tested-by: K Prateek Nayak <kprateek.nayak@amd.com> Signed-off-by: Marco Scardovi <scardracs@disroot.org> Reviewed-by: K Prateek Nayak <kprateek.anayk@amd.com> Link: https://lore.kernel.org/r/20260609073042.81275-2-scardracs@disroot.org Signed-off-by: Mario Limonciello <superm1@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions