From: Dhananjay Ugwekar Date: Wed, 5 Feb 2025 11:25:23 +0000 (+0000) Subject: cpufreq/amd-pstate: Remove the unncecessary driver_lock in amd_pstate_update_limits X-Git-Tag: v6.15-rc1~191^2~4^2~2^2~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e93edc58a63cf816e6dc853da8e9b0201bd0298;p=thirdparty%2Fkernel%2Flinux.git cpufreq/amd-pstate: Remove the unncecessary driver_lock in amd_pstate_update_limits There is no need to take a driver wide lock while updating the highest_perf value in the percpu cpudata struct. Hence remove it. Signed-off-by: Dhananjay Ugwekar Reviewed-by: Mario Limonciello Reviewed-by: Gautham R. Shenoy Link: https://lore.kernel.org/r/20250205112523.201101-13-dhananjay.ugwekar@amd.com Signed-off-by: Mario Limonciello --- diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c index ee7e3f0a4c0a3..08ae480768120 100644 --- a/drivers/cpufreq/amd-pstate.c +++ b/drivers/cpufreq/amd-pstate.c @@ -832,8 +832,6 @@ static void amd_pstate_update_limits(unsigned int cpu) if (!policy) return; - guard(mutex)(&amd_pstate_driver_lock); - if (amd_get_highest_perf(cpu, &cur_high)) return;