Skip to content

Commit

Permalink
cpufreq: amd-pstate: Remove unnecessary driver_lock in set_boost
Browse files Browse the repository at this point in the history
[ Upstream commit db1cafc ]

set_boost is a per-policy function call, hence a driver wide lock is
unnecessary. Also this mutex_acquire can collide with the mutex_acquire
from the mode-switch path in status_store(), which can lead to a
deadlock. So, remove it.

Signed-off-by: Dhananjay Ugwekar <dhananjay.ugwekar@amd.com>
Acked-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Dhananjay Ugwekar authored and Greg Kroah-Hartman committed May 29, 2025
1 parent 9e2bac6 commit cd347d0
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/cpufreq/amd-pstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,6 @@ static int amd_pstate_set_boost(struct cpufreq_policy *policy, int state)
pr_err("Boost mode is not supported by this processor or SBIOS\n");
return -EOPNOTSUPP;
}
guard(mutex)(&amd_pstate_driver_lock);

ret = amd_pstate_cpu_boost_update(policy, state);
refresh_frequency_limits(policy);
Expand Down

0 comments on commit cd347d0

Please sign in to comment.