]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
cpufreq: amd-pstate: Remove unnecessary driver_lock in set_boost
authorDhananjay Ugwekar <dhananjay.ugwekar@amd.com>
Thu, 30 Jan 2025 08:52:52 +0000 (08:52 +0000)
committerViresh Kumar <viresh.kumar@linaro.org>
Thu, 6 Feb 2025 03:34:30 +0000 (09:04 +0530)
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>
drivers/cpufreq/amd-pstate.c

index dd9b8d6993d695decd271901dd751584398fde2b..a7e70fe0c57dfb1ef8f35a30b47919ddf892292c 100644 (file)
@@ -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;