From: Viresh Kumar <viresh.kumar@linaro.org>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: Rafael Wysocki <rjw@rjwysocki.net>,
Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>,
linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org,
arnd.bergmann@linaro.org, andrew@lunn.ch,
gregory.clement@free-electrons.com, jason@lakedaemon.net,
sebastian.hesselbarth@gmail.com,
thomas.petazzoni@free-electrons.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 06/10] PM / OPP: Add dev_pm_opp_get_sharing_cpus()
Date: Wed, 27 Apr 2016 08:29:22 +0530 [thread overview]
Message-ID: <20160427025922.GC22326@vireshk-i7> (raw)
In-Reply-To: <20160422222106.GP13149@codeaurora.org>
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
next prev parent reply other threads:[~2016-04-27 2:59 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1461228504.git.viresh.kumar@linaro.org>
2016-04-21 8:58 ` [PATCH 01/10] PM / OPP: Propagate the error returned by _find_opp_table() Viresh Kumar
2016-04-22 22:14 ` Stephen Boyd
2016-04-21 8:58 ` [PATCH 02/10] PM / OPP: Add missing doc style comments Viresh Kumar
2016-04-22 22:15 ` Stephen Boyd
2016-04-21 8:58 ` [PATCH 03/10] PM / OPP: dev_pm_opp_set_sharing_cpus() doesn't depend on CONFIG_OF Viresh Kumar
2016-04-22 22:16 ` Stephen Boyd
2016-04-21 8:58 ` [PATCH 04/10] PM / OPP: Relocate dev_pm_opp_set_sharing_cpus() Viresh Kumar
2016-04-22 22:22 ` Stephen Boyd
2016-04-21 8:58 ` [PATCH 05/10] PM / OPP: Mark shared-opp for non-dt case Viresh Kumar
2016-04-22 22:21 ` Stephen Boyd
2016-04-21 8:58 ` [PATCH 06/10] PM / OPP: Add dev_pm_opp_get_sharing_cpus() Viresh Kumar
2016-04-22 22:21 ` Stephen Boyd
2016-04-27 2:59 ` Viresh Kumar [this message]
2016-04-21 8:58 ` [PATCH 07/10] cpufreq: dt: Identify cpu-sharing for platforms without operating-points-v2 Viresh Kumar
2016-04-22 22:27 ` Stephen Boyd
2016-04-25 9:36 ` Viresh Kumar
2016-04-25 21:45 ` Stephen Boyd
2016-04-25 21:48 ` Rafael J. Wysocki
2016-04-25 21:56 ` Stephen Boyd
2016-04-25 22:03 ` Rafael J. Wysocki
2016-04-21 8:59 ` [PATCH 08/10] mvebu: Use dev_pm_opp_set_sharing_cpus() to mark OPP tables as shared Viresh Kumar
2016-04-22 22:24 ` Stephen Boyd
2016-04-21 8:59 ` [PATCH 09/10] cpufreq: dt: Kill platform-data Viresh Kumar
2016-04-22 22:26 ` Stephen Boyd
2016-04-21 8:59 ` [PATCH 10/10] cpufreq: mvebu: Use generic platdev driver Viresh Kumar
2016-04-22 22:42 ` Arnd Bergmann
2016-04-25 3:00 ` Viresh Kumar
2016-04-25 12:53 ` Arnd Bergmann
2016-04-25 12:56 ` Viresh Kumar
2016-04-25 15:26 ` Arnd Bergmann
2016-04-25 15:29 ` Viresh Kumar
2016-04-25 15:46 ` Arnd Bergmann
2016-04-25 15:55 ` Thomas Petazzoni
2016-04-22 3:16 ` [PATCH] PM / OPP: -ENOSYS is applicable only to syscalls Viresh Kumar
2016-04-22 12:42 ` Rafael J. Wysocki
2016-04-22 14:59 ` One Thousand Gnomes
2016-04-27 2:47 ` Viresh Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160427025922.GC22326@vireshk-i7 \
--to=viresh.kumar@linaro.org \
--cc=andrew@lunn.ch \
--cc=arnd.bergmann@linaro.org \
--cc=gregory.clement@free-electrons.com \
--cc=jason@lakedaemon.net \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=nm@ti.com \
--cc=rjw@rjwysocki.net \
--cc=sboyd@codeaurora.org \
--cc=sebastian.hesselbarth@gmail.com \
--cc=thomas.petazzoni@free-electrons.com \
--cc=vireshk@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox