public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cpufreq/amd-pstate: Add the missing cpufreq_cpu_put()
@ 2024-07-31  8:32 Dhananjay Ugwekar
  2024-07-31  8:38 ` Dhananjay Ugwekar
  0 siblings, 1 reply; 4+ messages in thread
From: Dhananjay Ugwekar @ 2024-07-31  8:32 UTC (permalink / raw)
  To: ray.huang, gautham.shenoy, mario.limonciello, perry.yuan, rafael,
	viresh.kumar
  Cc: linux-pm, linux-kernel, Dhananjay Ugwekar

Fix the reference counting of cpufreq_policy object in amd_pstate_update()
function by adding the missing cpufreq_cpu_put().

Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com>
---
 drivers/cpufreq/amd-pstate.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
index 804fab4ebb26..36edae40db1a 100644
--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@ -560,6 +560,8 @@ static void amd_pstate_update(struct amd_cpudata *cpudata, u32 min_perf,
 
 	amd_pstate_update_perf(cpudata, min_perf, des_perf,
 			       max_perf, fast_switch);
+
+	cpufreq_cpu_put(policy);
 }
 
 static int amd_pstate_verify(struct cpufreq_policy_data *policy)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] cpufreq/amd-pstate: Add the missing cpufreq_cpu_put()
  2024-07-31  8:32 [PATCH] cpufreq/amd-pstate: Add the missing cpufreq_cpu_put() Dhananjay Ugwekar
@ 2024-07-31  8:38 ` Dhananjay Ugwekar
  2024-08-01  3:13   ` Yuan, Perry
  0 siblings, 1 reply; 4+ messages in thread
From: Dhananjay Ugwekar @ 2024-07-31  8:38 UTC (permalink / raw)
  To: ray.huang, gautham.shenoy, mario.limonciello, perry.yuan, rafael,
	viresh.kumar
  Cc: linux-pm, linux-kernel

Forgot the fixes tag,

On 7/31/2024 2:02 PM, Dhananjay Ugwekar wrote:
> Fix the reference counting of cpufreq_policy object in amd_pstate_update()
> function by adding the missing cpufreq_cpu_put().
>

Fixes: e8f555daacd3 ("cpufreq/amd-pstate: fix setting policy current frequency value")

Thanks,
Dhananjay
> Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com>
> ---
>  drivers/cpufreq/amd-pstate.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
> index 804fab4ebb26..36edae40db1a 100644
> --- a/drivers/cpufreq/amd-pstate.c
> +++ b/drivers/cpufreq/amd-pstate.c
> @@ -560,6 +560,8 @@ static void amd_pstate_update(struct amd_cpudata *cpudata, u32 min_perf,
>  
>  	amd_pstate_update_perf(cpudata, min_perf, des_perf,
>  			       max_perf, fast_switch);
> +
> +	cpufreq_cpu_put(policy);
>  }
>  
>  static int amd_pstate_verify(struct cpufreq_policy_data *policy)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] cpufreq/amd-pstate: Add the missing cpufreq_cpu_put()
  2024-07-31  8:38 ` Dhananjay Ugwekar
@ 2024-08-01  3:13   ` Yuan, Perry
  2024-08-01  3:39     ` Dhananjay Ugwekar
  0 siblings, 1 reply; 4+ messages in thread
From: Yuan, Perry @ 2024-08-01  3:13 UTC (permalink / raw)
  To: Ugwekar, Dhananjay, Shenoy, Gautham Ranjal
  Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	rafael@kernel.org, viresh.kumar@linaro.org, Huang, Ray,
	Limonciello, Mario

[AMD Official Use Only - AMD Internal Distribution Only]

Hi Dhananjay

> -----Original Message-----
> From: Ugwekar, Dhananjay <Dhananjay.Ugwekar@amd.com>
> Sent: Wednesday, July 31, 2024 4:39 PM
> To: Huang, Ray <Ray.Huang@amd.com>; Shenoy, Gautham Ranjal
> <gautham.shenoy@amd.com>; Limonciello, Mario
> <Mario.Limonciello@amd.com>; Yuan, Perry <Perry.Yuan@amd.com>;
> rafael@kernel.org; viresh.kumar@linaro.org
> Cc: linux-pm@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] cpufreq/amd-pstate: Add the missing cpufreq_cpu_put()
>
> Forgot the fixes tag,
>
> On 7/31/2024 2:02 PM, Dhananjay Ugwekar wrote:
> > Fix the reference counting of cpufreq_policy object in
> > amd_pstate_update() function by adding the missing cpufreq_cpu_put().
> >
>
> Fixes: e8f555daacd3 ("cpufreq/amd-pstate: fix setting policy current
> frequency value")
>
> Thanks,
> Dhananjay
> > Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com>
> > ---
> >  drivers/cpufreq/amd-pstate.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/cpufreq/amd-pstate.c
> > b/drivers/cpufreq/amd-pstate.c index 804fab4ebb26..36edae40db1a
> 100644
> > --- a/drivers/cpufreq/amd-pstate.c
> > +++ b/drivers/cpufreq/amd-pstate.c
> > @@ -560,6 +560,8 @@ static void amd_pstate_update(struct amd_cpudata
> > *cpudata, u32 min_perf,
> >
> >     amd_pstate_update_perf(cpudata, min_perf, des_perf,
> >                            max_perf, fast_switch);
> > +
> > +   cpufreq_cpu_put(policy);
> >  }
> >
> >  static int amd_pstate_verify(struct cpufreq_policy_data *policy)

Thanks for the fix,   it needs to send v2 with the Fixes tag.

Reviewed-by: Perry Yuan <perry.yuan@amd.com>

Best Regards.

Perry.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] cpufreq/amd-pstate: Add the missing cpufreq_cpu_put()
  2024-08-01  3:13   ` Yuan, Perry
@ 2024-08-01  3:39     ` Dhananjay Ugwekar
  0 siblings, 0 replies; 4+ messages in thread
From: Dhananjay Ugwekar @ 2024-08-01  3:39 UTC (permalink / raw)
  To: Yuan, Perry, Shenoy, Gautham Ranjal
  Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	rafael@kernel.org, viresh.kumar@linaro.org, Huang, Ray,
	Limonciello, Mario



On 8/1/2024 8:43 AM, Yuan, Perry wrote:
> [AMD Official Use Only - AMD Internal Distribution Only]
> 
> Hi Dhananjay
> 
>> -----Original Message-----
>> From: Ugwekar, Dhananjay <Dhananjay.Ugwekar@amd.com>
>> Sent: Wednesday, July 31, 2024 4:39 PM
>> To: Huang, Ray <Ray.Huang@amd.com>; Shenoy, Gautham Ranjal
>> <gautham.shenoy@amd.com>; Limonciello, Mario
>> <Mario.Limonciello@amd.com>; Yuan, Perry <Perry.Yuan@amd.com>;
>> rafael@kernel.org; viresh.kumar@linaro.org
>> Cc: linux-pm@vger.kernel.org; linux-kernel@vger.kernel.org
>> Subject: Re: [PATCH] cpufreq/amd-pstate: Add the missing cpufreq_cpu_put()
>>
>> Forgot the fixes tag,
>>
>> On 7/31/2024 2:02 PM, Dhananjay Ugwekar wrote:
>>> Fix the reference counting of cpufreq_policy object in
>>> amd_pstate_update() function by adding the missing cpufreq_cpu_put().
>>>
>>
>> Fixes: e8f555daacd3 ("cpufreq/amd-pstate: fix setting policy current
>> frequency value")
>>
>> Thanks,
>> Dhananjay
>>> Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com>
>>> ---
>>>  drivers/cpufreq/amd-pstate.c | 2 ++
>>>  1 file changed, 2 insertions(+)
>>>
>>> diff --git a/drivers/cpufreq/amd-pstate.c
>>> b/drivers/cpufreq/amd-pstate.c index 804fab4ebb26..36edae40db1a
>> 100644
>>> --- a/drivers/cpufreq/amd-pstate.c
>>> +++ b/drivers/cpufreq/amd-pstate.c
>>> @@ -560,6 +560,8 @@ static void amd_pstate_update(struct amd_cpudata
>>> *cpudata, u32 min_perf,
>>>
>>>     amd_pstate_update_perf(cpudata, min_perf, des_perf,
>>>                            max_perf, fast_switch);
>>> +
>>> +   cpufreq_cpu_put(policy);
>>>  }
>>>
>>>  static int amd_pstate_verify(struct cpufreq_policy_data *policy)
> 
> Thanks for the fix,   it needs to send v2 with the Fixes tag.
> 
> Reviewed-by: Perry Yuan <perry.yuan@amd.com>

Thanks, will send out v2 with fixes and rb tag

Regards,
Dhananjay

> 
> Best Regards.
> 
> Perry.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-08-01  3:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-31  8:32 [PATCH] cpufreq/amd-pstate: Add the missing cpufreq_cpu_put() Dhananjay Ugwekar
2024-07-31  8:38 ` Dhananjay Ugwekar
2024-08-01  3:13   ` Yuan, Perry
2024-08-01  3:39     ` Dhananjay Ugwekar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox