From: Viresh Kumar <viresh.kumar@linaro.org>
To: rjw@sisk.pl, inderpal.singh@linaro.org
Cc: cpufreq@vger.kernel.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org, linaro-dev@lists.linaro.org,
patches@linaro.org, robin.randhawa@arm.com,
Steve.Bannister@arm.com, Liviu.Dudau@arm.com,
Viresh Kumar <viresh.kumar@linaro.org>
Subject: [PATCH 1/2] cpufreq: Set policy->related_cpus to atleast policy->cpus
Date: Tue, 29 Jan 2013 10:09:59 +0530 [thread overview]
Message-ID: <d6827976a56d429848ab8ababa2779a21c68d65f.1359434113.git.viresh.kumar@linaro.org> (raw)
With the addition of following patch, related_cpus is required to be set by
cpufreq platform drivers:
commit c1070fd743533efb54e98142252283583f379190
Author: Viresh Kumar <viresh.kumar@linaro.org>
Date: Mon Jan 14 13:23:04 2013 +0000
cpufreq: Simplify cpufreq_add_dev()
Because this change is required by all platform drivers, why not do this in the
core itself. Hence, this patch is an attempt towards fixing all broken drivers.
>From now on, platforms don't really need to set related_cpus from their init()
routines, as the same work is done by core too.
If platform driver needs to set the related_cpus mask with some additional cpus,
other than cpus present in policy->cpus, they are free to do it as we aren't
overriding anything.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
Inderpal,
Can you please add your tested-by for this patch? And this will require you to
drop your patch for exynos-cpufreq.c :)
drivers/cpufreq/cpufreq.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index f5dc02b..db81382 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -554,8 +554,6 @@ static ssize_t show_cpus(const struct cpumask *mask, char *buf)
*/
static ssize_t show_related_cpus(struct cpufreq_policy *policy, char *buf)
{
- if (cpumask_empty(policy->related_cpus))
- return show_cpus(policy->cpus, buf);
return show_cpus(policy->related_cpus, buf);
}
@@ -945,6 +943,9 @@ static int cpufreq_add_dev(struct device *dev, struct subsys_interface *sif)
goto err_unlock_policy;
}
+ /* related cpus should atleast have policy->cpus */
+ cpumask_or(policy->related_cpus, policy->related_cpus, policy->cpus);
+
/*
* affected cpus must always be the one, which are online. We aren't
* managing offline cpus here.
--
1.7.12.rc2.18.g61b472e
next reply other threads:[~2013-01-29 4:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-29 4:39 Viresh Kumar [this message]
2013-01-29 4:40 ` [PATCH 2/2] Revert "cpufreq: Don't use cpu removed during cpufreq_driver_unregister" Viresh Kumar
2013-01-29 4:41 ` [PATCH 1/2] cpufreq: Set policy->related_cpus to atleast policy->cpus Viresh Kumar
2013-01-29 11:51 ` Rafael J. Wysocki
2013-01-29 14:30 ` Viresh Kumar
2013-01-29 21:50 ` 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=d6827976a56d429848ab8ababa2779a21c68d65f.1359434113.git.viresh.kumar@linaro.org \
--to=viresh.kumar@linaro.org \
--cc=Liviu.Dudau@arm.com \
--cc=Steve.Bannister@arm.com \
--cc=cpufreq@vger.kernel.org \
--cc=inderpal.singh@linaro.org \
--cc=linaro-dev@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=patches@linaro.org \
--cc=rjw@sisk.pl \
--cc=robin.randhawa@arm.com \
/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).