RE: [PATCH 2/2] omap2+: pm: cpufreq: Fix loops_per_jiffy calculation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Russell King - ARM Linux [mailto:linux@xxxxxxxxxxxxxxxx] 
> Sent: Friday, June 24, 2011 4:22 PM
> To: Premi, Sanjeev
> Cc: linux-omap@xxxxxxxxxxxxxxx; linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [PATCH 2/2] omap2+: pm: cpufreq: Fix 
> loops_per_jiffy calculation
> 
> On Fri, Jun 24, 2011 at 04:18:31PM +0530, Premi, Sanjeev wrote:
> > > -----Original Message-----
> > > From: Russell King - ARM Linux [mailto:linux@xxxxxxxxxxxxxxxx] 
> > > Sent: Friday, June 24, 2011 4:14 PM
> > > To: Premi, Sanjeev
> > > Cc: linux-omap@xxxxxxxxxxxxxxx; 
> linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
> > > Subject: Re: [PATCH 2/2] omap2+: pm: cpufreq: Fix 
> > > loops_per_jiffy calculation
> > > 
> > > On Fri, Jun 24, 2011 at 04:05:42PM +0530, Sanjeev Premi wrote:
> > > > Currently, loops_per_jiffy is being calculated before calling
> > > > cpufreq_notify_transition().
> > > > 
> > > > However, generic cpufreq driver adjusts the jiffies as well.
> > > > Double adjustment leads to incorrect value being assigned to
> > > > loops_per_jiffy.
> > > 
> > > Are you sure the generic cpufreq driver adjusts the per-cpu 
> > > loops_per_jiffy
> > > values?  I don't believe it does.
> > 
> > Russell,
> > 
> > I am quoting the function from drivers/cpufreq/cpufreq.h
> > Follow the arrows:
> 
> Let's go to war with quotes then, because clearly you haven't 
> read the code
> properly:

[sp] Peace. No war!
     Looks like I missed the ifndef in systax highlighting on my
     editor. As mentioned, I couldn't test on OMAP4.
     The patch obvioulsy works for A8... SMP needs to be fixed.
     v2 coming soon.

~sanjeev

> 
> | #ifndef CONFIG_SMP
> ^^^^^^^^^^^^^^^^^^^^^
> | static unsigned long l_p_j_ref;
> | static unsigned int  l_p_j_ref_freq;
> | 
> | static void adjust_jiffies(unsigned long val, struct 
> cpufreq_freqs *ci)
> | {
> | 	... code to adjust jiffies ...
> | }
> | #else
> | static inline void adjust_jiffies(unsigned long val, struct 
> cpufreq_freqs *ci)
> | {
> |         return;
> | }
> | #endif
> 
> Notice how if CONFIG_SMP is set, adjust_jiffies becomes a 
> no-op.  So if
> CONFIG_SMP=y, loops_per_jiffy will _not_ be scaled by core code.
> --
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux