diff mbox series

[12/12] cpufreq/amd-pstate: Remove the unncecessary driver_lock in amd_pstate_update_limits

Message ID 20250205112523.201101-13-dhananjay.ugwekar@amd.com (mailing list archive)
State New
Delegated to: Mario Limonciello
Headers show
Series cpufreq/amd-pstate: Fixes and optimizations | expand

Commit Message

Dhananjay Ugwekar Feb. 5, 2025, 11:25 a.m. UTC
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 <dhananjay.ugwekar@amd.com>
---
 drivers/cpufreq/amd-pstate.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Mario Limonciello Feb. 5, 2025, 5:50 p.m. UTC | #1
On 2/5/2025 05:25, Dhananjay Ugwekar wrote:
> 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 <dhananjay.ugwekar@amd.com>

Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>

> ---
>   drivers/cpufreq/amd-pstate.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
> index ee7e3f0a4c0a..08ae48076812 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;
>
diff mbox series

Patch

diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
index ee7e3f0a4c0a..08ae48076812 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;