From: Dhananjay Ugwekar Date: Thu, 30 Jan 2025 08:52:52 +0000 (+0000) Subject: cpufreq: amd-pstate: Remove unnecessary driver_lock in set_boost X-Git-Tag: v6.15-rc1~191^2~4^2^2~57 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=db1cafc77aaaf871509da06f4a864e9af6d6791f;p=thirdparty%2Fkernel%2Flinux.git 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 Acked-by: Mario Limonciello Signed-off-by: Viresh Kumar --- diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c index dd9b8d6993d69..a7e70fe0c57df 100644 --- a/drivers/cpufreq/amd-pstate.c +++ b/drivers/cpufreq/amd-pstate.c @@ -744,7 +744,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); policy->boost_enabled = !ret ? state : false;