[PATCHv2] omap2+: pm: cpufreq: Fix loops_per_jiffy calculation

Premi, Sanjeev premi at ti.com
Sat Jun 25 14:53:31 EDT 2011


> -----Original Message-----
> From: Shilimkar, Santosh 
> Sent: Saturday, June 25, 2011 12:18 AM
> To: Russell King - ARM Linux
> Cc: Premi, Sanjeev; linux-omap at vger.kernel.org; 
> linux-arm-kernel at lists.infradead.org; Hilman, Kevin
> Subject: Re: [PATCHv2] omap2+: pm: cpufreq: Fix 
> loops_per_jiffy calculation
> 
> Russell,
> 
> On 6/24/2011 8:12 AM, Russell King - ARM Linux wrote:
> > Right, thanks for the file.  Here's the patch.
> >
> 
> [.....]
> 
> > Notice how we adjust _both_ the per-cpu loops_per_jiffy, and that we
> > adjust them with reference to the initial values.
> >
> > If you adjust lpj with reference to the last, then you 
> _will_ build up
> > a progressively bigger and bigger error in the value over time.
> >
> Thanks Russell for the change. This change should fix the global
> lpj for UP machine as well when build with SMP_ON_UP.
> 
> Can you have a look at below complete change which should
> make the BOGOMIPS happy on all OMAP2PLUS machines. Generated
> against Kevin's cpufreq branch.
> 
> url = 
> git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-om
> ap-pm.git 
> pm-wip/cpufreq.
> 
> Just compile tested with UP and SMP OMAP builds. After your
> review, I can give a test.
> 
> Regards
> Santosh
> 
>  From 9a6154c0f68e39c4d1fbc4ef3fef5ce577ba87d4 Mon Sep 17 
> 00:00:00 2001
> From: Russell King <rmk+kernel at arm.linux.org.uk>
> Date: Fri, 24 Jun 2011 10:51:17 -0700
> Subject: [PATCH] OMAP2+: CPUfreq: update lpj with refernce 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 also re-use the notifiers for UP/SMP since on
> UP machine or UP_ON_SMP policy->cpus mask would contain only
> the one CPU.
> 
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar at ti.com>
> [santosh.shilimkar at ti.com: rebased against omap cpufreq 
> upstream branch]
> Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
> Cc: Kevin Hilman <khilman at ti.com>

[sp] I thought we were solving a problem - but this makes it
     look like race for addding sign-offs - which I am not
     interested in.

[snip]...[snip]



More information about the linux-arm-kernel mailing list