summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-report
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@amd.com>2026-09-21 14:02:32 -0500
committerMario Limonciello <superm1@kernel.org>2026-10-01 12:56:41 -0500
commitf6d3cbc63935fa8911da87e91ed768824d495470 (patch)
treecacdb2d426a610ec14c317d1e7be8f602c9b8eb3 /tools/perf/scripts/python/bin/stackcollapse-report
parentb3f9051ae263940af4a69212c88fd094401cf92d (diff)
cpufreq: amd-pstate: Restore previous mode when changing driver mode fails
amd_pstate_change_driver_mode() unregisters the currently active driver before registering the requested mode. If amd_pstate_register_driver() fails for the new mode, the function returns the error without restoring anything, leaving the system with no cpufreq scaling driver at all until a valid mode is manually re-selected. Remember the mode that was active before the transition and, if registering the requested mode fails, register the previous mode again so the system keeps a working scaling driver. The original error is still returned to the caller so the sysfs write reports the failure. Reported-by: Sashiko <sashiko-bot@kernel.org> Closes: https://sashiko.dev/#/bug/linux-5b138ddb-c88b-4f82-8a2d-f39446b625d4 Fixes: 3ca7bc818d8c ("cpufreq: amd-pstate: Add guided mode control support via sysfs") Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20260921190235.3651688-1-mario.limonciello@amd.com Signed-off-by: Mario Limonciello <superm1@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions