[PATCH v3 3/5] cpufreq: report whether cpufreq supports Frequency Invariance (FI)

Ionela Voinescu ionela.voinescu at arm.com
Tue Aug 25 07:07:56 EDT 2020


Hi Viresh,

On Tuesday 25 Aug 2020 at 11:57:09 (+0530), Viresh Kumar wrote:
[..]
> > +static inline
> > +void enable_cpufreq_freq_invariance(struct cpufreq_driver *driver)
> > +{
> > +	if (!driver->setpolicy) {
> > +		static_branch_enable_cpuslocked(&cpufreq_freq_invariance);
> > +		pr_debug("supports frequency invariance");
> > +	}
> > +}
> > +
> 
> I would rather open-code this int the cpufreq_register_driver() routine as
> that's what is done in cpufreq_unregister_driver() as well.
> 
> > +bool cpufreq_supports_freq_invariance(void)
> > +{
> > +	return static_branch_likely(&cpufreq_freq_invariance);
> > +}
> > +
> 
> And would keep the definition of the static key with this routine at a single
> place.

Makes sense and will do!

Thank you for the quick review,
Ionela.



More information about the linux-arm-kernel mailing list