public inbox for cpufreq@vger.kernel.org
 help / color / mirror / Atom feed
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Kevin Hilman <khilman@linaro.org>,
	Russell King <linux@arm.linux.org.uk>,
	"cpufreq@vger.kernel.org" <cpufreq@vger.kernel.org>,
	Dave Jones <davej@redhat.com>, Nishanth Menon <nm@ti.com>,
	linux-omap@vger.kernel.org,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Rajendra Nayak <rnayak@ti.com>
Subject: Re: [PATCH 02/10] cpufreq: OMAP: Add SMP support for OMAP4+
Date: Thu, 29 Aug 2013 09:37:12 -0400	[thread overview]
Message-ID: <521F4E88.1000709@ti.com> (raw)
In-Reply-To: <CAOh2x=k11EivJoy5-PMXnE5JGDc=DcJKhae7qoh6tNc4L63VnA@mail.gmail.com>

On Thursday 29 August 2013 06:02 AM, Viresh Kumar wrote:
> On Fri, Sep 23, 2011 at 2:37 AM, Kevin Hilman <khilman@ti.com> wrote:
>> From: Russell King <rmk+kernel@arm.linux.org.uk>
>>
>> On OMAP SMP configuartion, both processors share the voltage
>> and clock. So both CPUs needs to be scaled together and hence
>> needs software co-ordination.
>>
>> Also, update lpj with reference value to avoid progressive error.
>>
>> Adjust _both_ the per-cpu loops_per_jiffy and global lpj. Calibrate
>> them with with reference to the initial values to avoid a
>> progressively bigger and bigger error in the value over time.
>>
>> While at this, re-use the notifiers for UP/SMP since on UP machine or
>> UP_ON_SMP policy->cpus mask would contain only the boot CPU.
>>
>> Based on initial SMP support by Santosh Shilimkar.
>>
>> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
>> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>> [khilman@ti.com: due to overlap/rework, combined original Santosh patch
>>                  and Russell's rework]
>> Signed-off-by: Kevin Hilman <khilman@ti.com>
>> ---
>>  drivers/cpufreq/omap-cpufreq.c |   80 +++++++++++++++++++++++++++++++++++-----
>>  1 files changed, 70 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c
> 
>> +       /*
>> +        * On OMAP SMP configuartion, both processors share the voltage
>> +        * and clock. So both CPUs needs to be scaled together and hence
>> +        * needs software co-ordination. Use cpufreq affected_cpus
>> +        * interface to handle this scenario. Additional is_smp() check
>> +        * is to keep SMP_ON_UP build working.
>> +        */
>> +       if (is_smp()) {
>> +               policy->shared_type = CPUFREQ_SHARED_TYPE_ANY;
>> +               cpumask_or(cpumask, cpumask_of(policy->cpu), cpumask);
>> +               cpumask_copy(policy->cpus, cpumask);
>> +       }
> 
> Does somebody remember importance of is_smp() here??
>
Above code was under #ifdef CONFIG_SMP and SMP_ON_UP where config
SMP was enabled as well above steps were not needed.
 
> Current code looks like:
> 
> if (is_smp())
>     cpumask_setall(policy->cpus);
> 
> And I was looking to remove this check if it is no more useful.. And
> so simply do
> 
> cpumask_setall(policy->cpus);
> 
Thats should work I guess. Infact I changed this i downstream kernel
a while back but forgot to send a patch. Just see if for some reason
above can break UP machine since this driver is used on UP machines
as well. Other than that, it should be fine

Regards,
Santosh

  reply	other threads:[~2013-08-29 13:37 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-22 21:07 [PATCH 00/10] cpufreq: OMAP: move into drivers, cleanups/fixes for v3.2 Kevin Hilman
2011-09-22 21:07 ` [PATCH 01/10] cpufreq: OMAP: cleanup for multi-SoC support, move into drivers/cpufreq Kevin Hilman
2011-09-22 21:53   ` Tony Lindgren
2011-09-23  9:21   ` [PATCH 01/10] cpufreq: OMAP: cleanup for multi-SoC support,move " Vishwanath Sripathy
2011-09-23 14:02     ` Kevin Hilman
2011-09-22 21:07 ` [PATCH 02/10] cpufreq: OMAP: Add SMP support for OMAP4+ Kevin Hilman
2011-09-22 23:11   ` Kevin Hilman
2013-08-29 10:02   ` Viresh Kumar
2013-08-29 13:37     ` Santosh Shilimkar [this message]
2013-08-29 13:39       ` Viresh Kumar
2013-08-29 13:42         ` Santosh Shilimkar
     [not found]           ` <CAKohpomco=TodaosVbvAhFSxrth9aZ1gh+VOHftG1w6nYWBsPg@mail.gmail.com>
2013-08-30  5:58             ` Viresh Kumar
2013-08-30 13:26             ` Santosh Shilimkar
2011-09-22 21:07 ` [PATCH 03/10] cpufreq: OMAP: Enable all CPUs in shared policy mask Kevin Hilman
2011-09-22 21:07 ` [PATCH 04/10] cpufreq: OMAP: notify even with bad boot frequency Kevin Hilman
2011-09-22 21:07 ` [PATCH 05/10] cpufreq: OMAP: move clk name decision to init Kevin Hilman
2011-09-22 21:07 ` [PATCH 06/10] cpufreq: OMAP: deny initialization if no mpudev Kevin Hilman
2011-09-22 21:07 ` [PATCH 07/10] cpufreq: OMAP: dont support !freq_table Kevin Hilman
2011-09-22 21:07 ` [PATCH 08/10] cpufreq: OMAP: only supports OPP library Kevin Hilman
2011-09-22 21:07 ` [PATCH 09/10] cpufreq: OMAP: put clk if cpu_init failed Kevin Hilman
2011-09-22 21:07 ` [PATCH 10/10] cpufreq: OMAP: fix freq_table leak Kevin Hilman
2011-11-02 22:02 ` [PATCH 00/10] cpufreq: OMAP: move into drivers, cleanups/fixes for v3.2 Kevin Hilman
2011-11-02 22:08   ` Dave Jones
2011-11-02 23:37     ` Kevin Hilman
2011-11-08 19:48     ` Kevin Hilman
2011-11-08 19:59       ` Dave Jones

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=521F4E88.1000709@ti.com \
    --to=santosh.shilimkar@ti.com \
    --cc=cpufreq@vger.kernel.org \
    --cc=davej@redhat.com \
    --cc=khilman@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=nm@ti.com \
    --cc=rnayak@ti.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