Messages in this thread | | | From | "Yuan, Perry" <> | Subject | RE: [RESEND PATCH V2 7/9] cpufreq: amd_pstate: add AMD Pstate EPP support for the MSR based processors | Date | Tue, 11 Oct 2022 05:45:21 +0000 |
| |
[AMD Official Use Only - General]
Hi Viresh.
> -----Original Message----- > From: Viresh Kumar <viresh.kumar@linaro.org> > Sent: Tuesday, October 11, 2022 10:54 AM > To: Yuan, Perry <Perry.Yuan@amd.com> > Cc: rafael.j.wysocki@intel.com; Huang, Ray <Ray.Huang@amd.com>; Sharma, > Deepak <Deepak.Sharma@amd.com>; Limonciello, Mario > <Mario.Limonciello@amd.com>; Fontenot, Nathan > <Nathan.Fontenot@amd.com>; Deucher, Alexander > <Alexander.Deucher@amd.com>; Huang, Shimmer > <Shimmer.Huang@amd.com>; Du, Xiaojian <Xiaojian.Du@amd.com>; Meng, Li > (Jassmine) <Li.Meng@amd.com>; linux-pm@vger.kernel.org; linux- > kernel@vger.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 .
| |