From: Santosh Shilimkar <santosh.shilimkar@ti.com>
To: "Menon, Nishanth" <nm@ti.com>
Cc: linux-omap@vger.kernel.org, khilman@ti.com,
Vishwanath BS <vishwanath.bs@ti.com>,
"Herman, Saquib" <saquib@ti.com>,
"Revanna, Amarnath" <amarnath@ti.com>
Subject: Re: [PATCH v2 2/2] OMAP2PLUS: cpufreq: Add SMP support to cater OMAP4430
Date: Wed, 11 May 2011 12:40:49 +0530 [thread overview]
Message-ID: <4DCA3679.8030603@ti.com> (raw)
In-Reply-To: <BANLkTinSPpmepfJNC=2SSPF5KzsHcKXGEw@mail.gmail.com>
On 5/11/2011 6:11 AM, Menon, Nishanth wrote:
> On Mon, Mar 14, 2011 at 06:38, Santosh Shilimkar
> <santosh.shilimkar@ti.com> wrote:
>> 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.
>>
>> Signed-off-by: Santosh Shilimkar<santosh.shilimkar@ti.com>
>> Cc: Kevin Hilman<khilman@ti.com>
>> cc: Vishwanath BS<vishwanath.bs@ti.com>
>> ---
>> arch/arm/mach-omap2/omap2plus-cpufreq.c | 73 ++++++++++++++++++++++++++-----
>> 1 files changed, 62 insertions(+), 11 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c
>
> [...]
>> rate = clk_get_rate(mpu_clk) / 1000;
>> @@ -74,9 +76,13 @@ static int omap_target(struct cpufreq_policy *policy,
> [...]
>
>> - cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
>> +#ifdef CONFIG_SMP
>> + /*
>> + * Note that loops_per_jiffy is not updated on SMP systems in
>> + * cpufreq driver. So, update the per-CPU loops_per_jiffy value
>> + * on frequency transition. We need to update all dependent CPUs.
>> + */
>> + for_each_cpu(i, policy->cpus)
>> + per_cpu(cpu_data, i).loops_per_jiffy =
>> + cpufreq_scale(per_cpu(cpu_data, i).loops_per_jiffy,
>> + freqs.old, freqs.new);
> We have an issue here - arch/arm/lib/delay.S uses the generic
> loops_per_jiffy which is not updated when smp (OMAP4) is active, as a
> result loops_per_jiffy contains the value which was updated. with a
> trace added as follows:
[...]
>
> Question: what would be the best solution for this? is a solution
> isolated to OMAP good enough?
>
We have debated on the global lpj update topic enough. The assumption
of all the CPU's in ARM SMP system are running at same speed in not
I propose this idea based on the fact that on OMAP we scale
all the CPU's in SMP clusture together. But that is not seems
to be true for all ARM SMP archs.
So there is a patch series which makes udelay() independent
of lpj and make use a timer.
Here is the link for the same.
http://eeek.borgchat.net/lists/arm-kernel/msg120702.html
Regards
Santosh
next prev parent reply other threads:[~2011-05-11 15:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-14 11:38 [PATCH v2 0/2] [pm-wip/cpufreq] OMAP: CPUfreq cleanup and SMP support Santosh Shilimkar
2011-03-14 11:38 ` [PATCH v2 1/2] OMAP: cpufreq: Split OMAP1 and OMAP2PLUS CPUfreq drivers Santosh Shilimkar
2011-03-14 11:38 ` [PATCH v2 2/2] OMAP2PLUS: cpufreq: Add SMP support to cater OMAP4430 Santosh Shilimkar
2011-05-11 0:41 ` Menon, Nishanth
2011-05-11 7:10 ` Santosh Shilimkar [this message]
2011-03-17 21:50 ` [PATCH v2 0/2] [pm-wip/cpufreq] OMAP: CPUfreq cleanup and SMP support Kevin Hilman
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=4DCA3679.8030603@ti.com \
--to=santosh.shilimkar@ti.com \
--cc=amarnath@ti.com \
--cc=khilman@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=nm@ti.com \
--cc=saquib@ti.com \
--cc=vishwanath.bs@ti.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).