mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: linaro-dev@lists.linaro.org, nicolas.pitre@linaro.org,
	amit.kucheria@linaro.org, mathieu.poirier@linaro.org,
	linux-kernel@vger.kernel.org, cpufreq@vger.kernel.org,
	pdsw-power-team@arm.com, linux-pm@vger.kernel.org
Subject: Re: [PATCH 1/3] cpufreq: Manage only online cpus
Date: Sun, 16 Dec 2012 14:04:24 +0100	[thread overview]
Message-ID: <4137114.myBUIQvsg3@vostro.rjw.lan> (raw)
In-Reply-To: <98330b2deb910453a356404b8cf774c94326bc42.1355636864.git.viresh.kumar@linaro.org>

On Sunday, December 16, 2012 11:20:08 AM Viresh Kumar wrote:
> cpufreq core doesn't manage offline cpus and if driver->init() has returned
> mask including offline cpus, it may result in unwanted behavior by cpufreq core
> or governors.
> 
> We need to get only online cpus in this mask. There are two places to fix this
> mask, cpufreq core and cpufreq driver. It makes sense to do this at common place
> and hence is done in core.

Well, this series makes sense to me, but I'd like to hear what the other people
think.

Thanks,
Rafael


> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>  drivers/cpufreq/cpufreq.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index 1f93dbd..de99517 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -970,6 +970,13 @@ static int cpufreq_add_dev(struct device *dev, struct subsys_interface *sif)
>  		pr_debug("initialization failed\n");
>  		goto err_unlock_policy;
>  	}
> +
> +	/*
> +	 * affected cpus must always be the one, which are online. We aren't
> +	 * managing offline cpus here.
> +	 */
> +	cpumask_and(policy->cpus, policy->cpus, cpu_online_mask);
> +
>  	policy->user_policy.min = policy->min;
>  	policy->user_policy.max = policy->max;
>  
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

  parent reply	other threads:[~2012-12-16 12:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-16  5:50 Viresh Kumar
2012-12-16  5:50 ` [PATCH 2/3] cpufreq: Notify governors when cpus are hot-[un]plugged Viresh Kumar
2012-12-16  5:50 ` [PATCH 3/3] cpufreq: Don't use cpu removed during cpufreq_driver_unregister Viresh Kumar
2013-01-03 14:25   ` Srivatsa S. Bhat
2013-01-04  5:19     ` Viresh Kumar
2013-01-04  6:03       ` Srivatsa S. Bhat
2012-12-16 13:04 ` Rafael J. Wysocki [this message]
2012-12-16 13:37   ` [PATCH 1/3] cpufreq: Manage only online cpus Viresh Kumar
2013-01-02  6:29     ` Viresh Kumar
2013-01-03  1:13       ` Rafael J. Wysocki
2013-01-03  3:32         ` Viresh Kumar
2013-01-03 12:02           ` Rafael J. Wysocki
2013-01-04  5:14             ` Viresh Kumar
2013-01-04 11:32               ` Rafael J. Wysocki
2013-01-11 22:43 ` Rafael J. Wysocki

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=4137114.myBUIQvsg3@vostro.rjw.lan \
    --to=rjw@sisk.pl \
    --cc=amit.kucheria@linaro.org \
    --cc=cpufreq@vger.kernel.org \
    --cc=linaro-dev@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=nicolas.pitre@linaro.org \
    --cc=pdsw-power-team@arm.com \
    --cc=viresh.kumar@linaro.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

all inboxes | Powered by JetHome®