summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-10-11 20:32:58 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-10-11 20:32:58 +0200
commit940efc9fc80a29c6d9320bc79e8d2e93e0dabfcc (patch)
tree1eafc445a5f4f1d32a6f9083a98ac8ed4d92bd76
parent8cf0b93919e13d1e8d4466eb4080a4c4d9d66d7b (diff)
parentc10e50a469b5ec91eabf653526a22bdce03a9bca (diff)
Merge tag 'amd-pstate-v6.12-2024-10-10' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux
Merge an amd-pstate fix for 6.12 from Mario Limonciello: "Fix an issue with changing amd-pstate modes at runtime on shared memory systems." * tag 'amd-pstate-v6.12-2024-10-10' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux: cpufreq/amd-pstate: Fix amd_pstate mode switch on shared memory systems
-rw-r--r--drivers/cpufreq/amd-pstate.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
index 15e201d5e911..4cf2ac5694cb 100644
--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@ -1201,11 +1201,21 @@ static int amd_pstate_register_driver(int mode)
return -EINVAL;
cppc_state = mode;
+
+ ret = amd_pstate_enable(true);
+ if (ret) {
+ pr_err("failed to enable cppc during amd-pstate driver registration, return %d\n",
+ ret);
+ amd_pstate_driver_cleanup();
+ return ret;
+ }
+
ret = cpufreq_register_driver(current_pstate_driver);
if (ret) {
amd_pstate_driver_cleanup();
return ret;
}
+
return 0;
}