[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM4PR12MB52782A5F40C7F18CCC199A009C239@DM4PR12MB5278.namprd12.prod.outlook.com>
Date: Tue, 11 Oct 2022 05:45:21 +0000
From: "Yuan, Perry" <Perry.Yuan@....com>
To: Viresh Kumar <viresh.kumar@...aro.org>
CC: "rafael.j.wysocki@...el.com" <rafael.j.wysocki@...el.com>,
"Huang, Ray" <Ray.Huang@....com>,
"Sharma, Deepak" <Deepak.Sharma@....com>,
"Limonciello, Mario" <Mario.Limonciello@....com>,
"Fontenot, Nathan" <Nathan.Fontenot@....com>,
"Deucher, Alexander" <Alexander.Deucher@....com>,
"Huang, Shimmer" <Shimmer.Huang@....com>,
"Du, Xiaojian" <Xiaojian.Du@....com>,
"Meng, Li (Jassmine)" <Li.Meng@....com>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [RESEND PATCH V2 7/9] cpufreq: amd_pstate: add AMD Pstate EPP
support for the MSR based processors
[AMD Official Use Only - General]
Hi Viresh.
> -----Original Message-----
> From: Viresh Kumar <viresh.kumar@...aro.org>
> Sent: Tuesday, October 11, 2022 10:54 AM
> To: Yuan, Perry <Perry.Yuan@....com>
> Cc: rafael.j.wysocki@...el.com; Huang, Ray <Ray.Huang@....com>; Sharma,
> Deepak <Deepak.Sharma@....com>; Limonciello, Mario
> <Mario.Limonciello@....com>; Fontenot, Nathan
> <Nathan.Fontenot@....com>; Deucher, Alexander
> <Alexander.Deucher@....com>; Huang, Shimmer
> <Shimmer.Huang@....com>; Du, Xiaojian <Xiaojian.Du@....com>; Meng, Li
> (Jassmine) <Li.Meng@....com>; linux-pm@...r.kernel.org; linux-
> kernel@...r.kernel.org
> Subject: Re: [RESEND PATCH V2 7/9] cpufreq: amd_pstate: add AMD Pstate EPP
> support for the MSR based processors
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> On 11-10-22, 00:22, Perry Yuan wrote:
> > +static void amd_pstate_update_max_freq(unsigned int cpu) {
> > + struct cpufreq_policy *policy = cpufreq_cpu_acquire(cpu);
>
> Why isn't cpufreq_cpu_get() enough here ? cpufreq_cpu_acquire() is special as it
> takes policy->rwsem as well and you shouldn't need it.
>
> > +
> > + if (!policy)
> > + return;
> > +
> > + refresh_frequency_limits(policy);
> > + cpufreq_cpu_release(policy);
> > +}
>
> --
> Viresh
Thanks for your suggestion. I will try the cpufreq_cpu_get() and get this fixed in v3.
Perry .
Powered by blists - more mailing lists