[PATCHv2] omap2+: pm: cpufreq: Fix loops_per_jiffy calculation
Russell King - ARM Linux
linux at arm.linux.org.uk
Fri Jun 24 10:14:02 EDT 2011
On Fri, Jun 24, 2011 at 07:39:41PM +0530, Premi, Sanjeev wrote:
> > -----Original Message-----
> > From: Russell King - ARM Linux [mailto:linux at arm.linux.org.uk]
> > Sent: Friday, June 24, 2011 7:32 PM
> > To: Premi, Sanjeev
> > Cc: linux-omap at vger.kernel.org; linux-arm-kernel at lists.infradead.org
> > Subject: Re: [PATCHv2] omap2+: pm: cpufreq: Fix
> > loops_per_jiffy calculation
>
> [snip]...[snip]
>
> > >
> > > +#ifdef CONFIG_SMP
> > > + /* Adjust jiffies before transition */
> > > + for_each_cpu(i, policy->cpus) {
> > > + unsigned long lpj = per_cpu(cpu_data,
> > i).loops_per_jiffy;
> > > +
> > > + per_cpu(cpu_data, i).loops_per_jiffy =
> > cpufreq_scale(lpj,
> > > + freqs.old,
> > > + freqs.new);
> > > + }
> > > +#endif
> > > +
> >
> > You didn't listen to what I told you. It'll be quicker for
> > me to write
> > this patch myself if you send me the *original* file.
> >
>
> Russell,
>
> The function adjust_jiffies() is no-op for CONFIG_SMP - but it
> is not the case with cpufreq_scale().
>
> So, when CONFIG_SMP is defined, then loops_per_jiffy would be
> calculated for both UP and SMP processors.
>
> Did I miss something else?
Yes you have, and you've not sent me the file, so I can't show you where
you've gone wrong.
More information about the linux-arm-kernel
mailing list