Skip to content

Commit 61e931e

Browse files
dhananjay-AMDgregkh
authored andcommitted
cpufreq: amd-pstate: Remove unnecessary driver_lock in set_boost
[ 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 <[email protected]> Acked-by: Mario Limonciello <[email protected]> Signed-off-by: Viresh Kumar <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent b82e496 commit 61e931e

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/cpufreq/amd-pstate.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,6 @@ static int amd_pstate_set_boost(struct cpufreq_policy *policy, int state)
696696
pr_err("Boost mode is not supported by this processor or SBIOS\n");
697697
return -EOPNOTSUPP;
698698
}
699-
guard(mutex)(&amd_pstate_driver_lock);
700699

701700
ret = amd_pstate_cpu_boost_update(policy, state);
702701
WRITE_ONCE(cpudata->boost_state, !ret ? state : false);

0 commit comments

Comments
 (0)