Skip to content

Commit db1cafc

Browse files
dhananjay-AMDvireshk
authored andcommitted
cpufreq: amd-pstate: Remove unnecessary driver_lock in set_boost
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]>
1 parent 4742da9 commit db1cafc

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
@@ -744,7 +744,6 @@ static int amd_pstate_set_boost(struct cpufreq_policy *policy, int state)
744744
pr_err("Boost mode is not supported by this processor or SBIOS\n");
745745
return -EOPNOTSUPP;
746746
}
747-
guard(mutex)(&amd_pstate_driver_lock);
748747

749748
ret = amd_pstate_cpu_boost_update(policy, state);
750749
policy->boost_enabled = !ret ? state : false;

0 commit comments

Comments
 (0)