[PATCHv2] omap2+: pm: cpufreq: Fix loops_per_jiffy calculation
From: Russell King - ARM Linux <hidden>
Date: 2011-06-24 14:14:02
Also in:
linux-omap
From: Russell King - ARM Linux <hidden>
Date: 2011-06-24 14:14:02
Also in:
linux-omap
On Fri, Jun 24, 2011 at 07:39:41PM +0530, Premi, Sanjeev wrote:
quoted
-----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]quoted
quoted
+#ifdef CONFIG_SMP + /* Adjust jiffies before transition */ + for_each_cpu(i, policy->cpus) { + unsigned long lpj = per_cpu(cpu_data,i).loops_per_jiffy;quoted
+ + per_cpu(cpu_data, i).loops_per_jiffy =cpufreq_scale(lpj,quoted
+ 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.