linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: viresh.kumar@linaro.org (Viresh Kumar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/3] PM/OPP: Don't skip cpu_dev->id when setting up cpumask
Date: Mon, 28 Dec 2015 08:41:23 +0530	[thread overview]
Message-ID: <20151228031123.GB3598@ubuntu> (raw)
In-Reply-To: <1451197318-12418-2-git-send-email-pi-cheng.chen@linaro.org>

On 27-12-15, 14:21, Pi-Cheng Chen wrote:
> Don't skip cpu_dev->id when setting up cpumask for CPUs that share the
> same OPP table. This might be helpful when handling cpumask without the
> original CPU bitfield set.
> 
> Signed-off-by: Pi-Cheng Chen <pi-cheng.chen@linaro.org>
> ---
>  drivers/base/power/opp/cpu.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/base/power/opp/cpu.c b/drivers/base/power/opp/cpu.c
> index 7b445e8..4914a0d 100644
> --- a/drivers/base/power/opp/cpu.c
> +++ b/drivers/base/power/opp/cpu.c
> @@ -214,7 +214,6 @@ EXPORT_SYMBOL_GPL(dev_pm_opp_of_cpumask_add_table);
>  /*
>   * Works only for OPP v2 bindings.
>   *
> - * cpumask should be already set to mask of cpu_dev->id.
>   * Returns -ENOENT if operating-points-v2 bindings aren't supported.
>   */
>  int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask)
> @@ -235,9 +234,6 @@ int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask
>  		goto put_cpu_node;
>  
>  	for_each_possible_cpu(cpu) {
> -		if (cpu == cpu_dev->id)
> -			continue;
> -
>  		tcpu_dev = get_cpu_device(cpu);
>  		if (!tcpu_dev) {
>  			dev_err(cpu_dev, "%s: failed to get cpu%d device\n",

Not this way. You should just set 'cpumask' to cpumask of cpu_dev->id
at the top of the function.

-- 
viresh

  reply	other threads:[~2015-12-28  3:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-27  6:21 [PATCH v2 0/3] ARM64: dts: cpufreq: mt8173: Migrate mt8173-cpufreq to use OPPv2 bindings Pi-Cheng Chen
2015-12-27  6:21 ` [PATCH v2 1/3] PM/OPP: Don't skip cpu_dev->id when setting up cpumask Pi-Cheng Chen
2015-12-28  3:11   ` Viresh Kumar [this message]
2015-12-28 13:06     ` [PATCH v2] PM/OPP: Set cpu_dev->id in cpumask first Pi-Cheng Chen
2015-12-29  3:50       ` Viresh Kumar
2016-01-03  1:01         ` Rafael J. Wysocki
2015-12-27  6:21 ` [PATCH v2 2/3] cpufreq: mt8173: migrate to use operating-points-v2 bindings Pi-Cheng Chen
2015-12-28  3:12   ` Viresh Kumar
2015-12-27  6:21 ` [PATCH v2 3/3] ARM64: dts: mt8173: Add CPU OPP, clock and regulator supply properties Pi-Cheng Chen
2015-12-28  3:13   ` Viresh Kumar
2016-01-05 10:21     ` Arnd Bergmann
2016-01-05 10:24       ` Viresh Kumar
2016-02-02 11:06         ` Matthias Brugger
2016-02-02 14:09           ` Matthias Brugger
2016-02-03  1:46             ` Pi-Cheng Chen

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=20151228031123.GB3598@ubuntu \
    --to=viresh.kumar@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).