Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1388612
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 06/10] PM / OPP: Add dev_pm_opp_get_sharing_cpus() |
| Date | 2016-04-27 05:00 +0200 |
| Message-ID | <rsnRM-1Xs-3@gated-at.bofh.it> (permalink) |
| References | <rqiCR-6mQ-5@gated-at.bofh.it> <rqiCS-6mQ-27@gated-at.bofh.it> <rqRKj-Ux-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 22-04-16, 15:21, Stephen Boyd wrote: > On 04/21, Viresh Kumar wrote: > > diff --git a/drivers/base/power/opp/cpu.c b/drivers/base/power/opp/cpu.c > > index 55cbf9bd8707..9c4eb90759fb 100644 > > --- a/drivers/base/power/opp/cpu.c > > +++ b/drivers/base/power/opp/cpu.c > > @@ -329,3 +329,48 @@ int dev_pm_opp_set_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask) > > return ret; > > } > > EXPORT_SYMBOL_GPL(dev_pm_opp_set_sharing_cpus); > > + > > +/** > > + * dev_pm_opp_get_sharing_cpus() - Get cpumask of CPUs sharing OPPs with @cpu_dev > > + * @cpu_dev: CPU device for which we do this operation > > + * @cpumask: cpumask to update with information of sharing CPUs > > + * > > + * This updates the @cpumask with CPUs that are sharing OPPs with @cpu_dev. > > + * > > + * Returns -ENODEV if OPP table isn't already present. > > + * > > + * Locking: The internal opp_table and opp structures are RCU protected. > > + * Hence this function internally uses RCU updater strategy with mutex locks > > + * to keep the integrity of the internal data structures. Callers should ensure > > + * that this function is *NOT* called under RCU protection or in contexts where > > + * mutex cannot be locked. > > + */ > > +int dev_pm_opp_get_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask) > > Is there a reason we use cpumask_var_t instead of struct cpumask * > here? My understanding is that cpumask_var_t is for stack > declarations. Just because we have been using that *consistently* everywhere in cpufreq and OPP core. I am fine with cpumask * as well, but we should be consistent. So, I will keep it cpumask_var_t for this patch, and lets see if we want to change all occurrences of the same in cpufreq and OPP core. Sounds reasonable ? -- viresh
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 06/10] PM / OPP: Add dev_pm_opp_get_sharing_cpus() Viresh Kumar <viresh.kumar@linaro.org> - 2016-04-21 11:00 +0200
Re: [PATCH 06/10] PM / OPP: Add dev_pm_opp_get_sharing_cpus() Stephen Boyd <sboyd@codeaurora.org> - 2016-04-23 00:30 +0200
Re: [PATCH 06/10] PM / OPP: Add dev_pm_opp_get_sharing_cpus() Viresh Kumar <viresh.kumar@linaro.org> - 2016-04-27 05:00 +0200
csiph-web