linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Francesco Lavra <francescolavra.fl@gmail.com>,
	Fengguang Wu <fengguang.wu@intel.com>
Cc: linux-mips@linux-mips.org, linux-ia64@vger.kernel.org,
	linux-sh@vger.kernel.org, Liviu.Dudau@arm.com,
	Steve.Bannister@arm.com, sparclinux@vger.kernel.org,
	arvind.chauhan@arm.com,
	Hans-Christian Egtvedt <egtvedt@samfundet.no>,
	Jesper Nilsson <jesper.nilsson@axis.com>,
	robin.randhawa@arm.com, Stephen Warren <swarren@wwwdotorg.org>,
	cpufreq@vger.kernel.org,
	Haavard Skinnemoen <hskinnemoen@gmail.com>,
	cbe-oss-dev@lists.ozlabs.org, Fenghua Yu <fenghua.yu@intel.com>,
	linaro-kernel@lists.linaro.org,
	Mike Frysinger <vapier@gentoo.org>,
	linux-pm@vger.kernel.org, Sekhar Nori <nsekhar@ti.com>,
	Guan Xuetao <gxt@mprc.pku.edu.cn>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	rjw@sisk.pl, Kukjin Kim <kgene.kim@samsung.com>,
	Borislav Petkov <bp@alien8.de>, Ben Dooks <ben-linux@fluff.org>,
	Thomas Renninger <trenn@suse.de>,
	linux-arm-kernel@lists.infradead.org,
	Mikael Starvik <starvik@axis.com>,
	Tony Luck <tony.luck@intel.com>,
	Eric Miao <eric.y.miao@gmail.com>,
	linux-cris-kernel@axis.com, linux-kernel@vger.kernel.org,
	Ralf Baechle <ralf@linux-mips.org>,
	Paul Mundt <lethal@linux-sh.org>,
	Sascha Hauer <kernel@pengutronix.de>,
	charles.garcia-tobin@arm.com, linuxppc-dev@lists.ozlabs.org,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH 1/2] cpufreq: Notify all policy->cpus in cpufreq_notify_transition()
Date: Sun, 24 Mar 2013 20:23:27 +0530	[thread overview]
Message-ID: <CAKohpomznLtxYZYx31xg+V5FesNiMwOqNDN0QNqOqUw_7g4Uhw@mail.gmail.com> (raw)
In-Reply-To: <514F0FB0.8030109@gmail.com>

On 24 March 2013 20:07, Francesco Lavra <francescolavra.fl@gmail.com> wrote:
> On 03/24/2013 02:48 PM, Viresh Kumar wrote:
>> policy->cpus contains all online cpus that have single shared clock line. And
>> their frequencies are always updated together.
>>
>> Many SMP system's cpufreq drivers take care of this in individual drivers but
>> the best place for this code is in cpufreq core.
>>
>> This patch modifies cpufreq_notify_transition() to notify frequency change for
>> all cpus in policy->cpus and hence updates all users of this API.

One thing about this work. I compiled it for ARM and Intel. Also this
stuff is tested
by "Fengguang Wu" <fengguang.wu@intel.com> automated build system.

I am not sure if that builds all architectures or not.
I tried to review my patch closely but their can be some minor mistakes.

I thought of adding this in the patch details but forgot at last.

Is their a simple way to compile stuff for all platforms? Sorry i am
not aware of
it :(

>> diff --git a/arch/blackfin/mach-common/cpufreq.c b/arch/blackfin/mach-common/cpufreq.c
>> +     ret = cpu_set_cclk(policy->cpu, freqs.new * 1000);
>> +     if (ret != 0) {
>> +             WARN_ONCE(ret, "cpufreq set freq failed %d\n", ret);
>> +             break;
>
> This doesn't even compile, as the break statement isn't in the
> for_each_online_cpu() loop anymore.

I tried to review it very carefully but this situation was a bit tricky :)
Thanks for trying it out.

Following should fix it for you:

commit 942ca8a6bc87e3c42beabc9102755136493e5355
Author: Viresh Kumar <viresh.kumar@linaro.org>
Date:   Sun Mar 24 20:21:43 2013 +0530

    fixup! cpufreq: Notify all policy->cpus in cpufreq_notify_transition()
---
 arch/blackfin/mach-common/cpufreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/blackfin/mach-common/cpufreq.c
b/arch/blackfin/mach-common/cpufreq.c
index 4e67368..995511e80 100644
--- a/arch/blackfin/mach-common/cpufreq.c
+++ b/arch/blackfin/mach-common/cpufreq.c
@@ -164,7 +164,7 @@ static int bfin_target(struct cpufreq_policy *policy,
        ret = cpu_set_cclk(policy->cpu, freqs.new * 1000);
        if (ret != 0) {
                WARN_ONCE(ret, "cpufreq set freq failed %d\n", ret);
-               break;
+               return ret;
        }
 #endif
        on_each_cpu(bfin_adjust_core_timer, &index, 1);


@Rafael: Let me add fixups for now, i will send final patch later after others
also review their part.

  reply	other threads:[~2013-03-24 14:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-24 13:48 [PATCH 1/2] cpufreq: Notify all policy->cpus in cpufreq_notify_transition() Viresh Kumar
2013-03-24 14:37 ` Francesco Lavra
2013-03-24 14:53   ` Viresh Kumar [this message]
2013-03-24 15:02     ` Rafael J. Wysocki
2013-03-25  5:19 ` Viresh Kumar
2013-03-25 16:48   ` Stephen Warren
2013-03-25 16:50     ` 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=CAKohpomznLtxYZYx31xg+V5FesNiMwOqNDN0QNqOqUw_7g4Uhw@mail.gmail.com \
    --to=viresh.kumar@linaro.org \
    --cc=Liviu.Dudau@arm.com \
    --cc=Steve.Bannister@arm.com \
    --cc=arvind.chauhan@arm.com \
    --cc=ben-linux@fluff.org \
    --cc=bp@alien8.de \
    --cc=cbe-oss-dev@lists.ozlabs.org \
    --cc=charles.garcia-tobin@arm.com \
    --cc=cpufreq@vger.kernel.org \
    --cc=davem@davemloft.net \
    --cc=egtvedt@samfundet.no \
    --cc=eric.y.miao@gmail.com \
    --cc=fengguang.wu@intel.com \
    --cc=fenghua.yu@intel.com \
    --cc=francescolavra.fl@gmail.com \
    --cc=gxt@mprc.pku.edu.cn \
    --cc=haojian.zhuang@gmail.com \
    --cc=hskinnemoen@gmail.com \
    --cc=jesper.nilsson@axis.com \
    --cc=kernel@pengutronix.de \
    --cc=kgene.kim@samsung.com \
    --cc=lethal@linux-sh.org \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-cris-kernel@axis.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=nsekhar@ti.com \
    --cc=ralf@linux-mips.org \
    --cc=rjw@sisk.pl \
    --cc=robin.randhawa@arm.com \
    --cc=sparclinux@vger.kernel.org \
    --cc=starvik@axis.com \
    --cc=swarren@wwwdotorg.org \
    --cc=tony.luck@intel.com \
    --cc=trenn@suse.de \
    --cc=vapier@gentoo.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).