-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/16/2011 08:57 AM, Linus Walleij wrote:
> On Fri, Dec 16, 2011 at 6:56 AM, Daniel Lezcano
> <daniel.lezc...@linaro.org> wrote:
>> [Me]
>>> what happens if you just reactivate CPUfreq then use menuconfig
>>> to go into drivers/ directly you will see the
>>> "Clocksource PRCMU Timer" (sorry the clksrc subsystem does not
>>> have its own submenu...), deselect that so as to use the
>>> more monotone MTU clock source (it lives up in
>>> arch/arm/plat-nomadik/timer.c by the way), what happens?
>>
>> I am still seeing the problem ... :/
> 
> Hm, let's see what we know:
> 
> - It's not due to the clocksources - we tried two of them
>   (both actually known to be good and stable) since the same
>   timers are used for sched_clock that is probably not the
>   cause either.
> - It's related to CPUfreq
> - Localtimer smp_twd CPUfreq patches does not help on
>   their own
> 
> But my commit ef7a474cef00594ccef432ce0840464e51ea4ac0
> adding the smp_twd clock may be giving the wrong frequency
> to the localtimer. This is on the eternal TODO to fix up
> the clock implementation for ux500.
> 
> Rabin fixed this in the non-mainline kernel:
> http://git.linaro.org/gitweb?p=bsp/st-ericsson/linux-3.0-ux500.git;a=commitdiff;h=0270d85bed4ff4f24b3aa79fe878c4ad6c5c4d5b
> 
> As you can see it hacks around in a quite different
> version of the CPUfreq driver (yes that needs to be fixed
> up too).
> 
> I should have thought about that immediately :-/ Too much in
> my head.
> 
> Can you try something like the below (together with the three
> smp_twd patches) to see if it solves the problem? It's an ugly
> fix though, the clock implementation and CPUfreq driver both
> needs to be fixed for real.
> 
> diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c
> index e832664..60378b3 100644
> --- a/arch/arm/mach-ux500/clock.c
> +++ b/arch/arm/mach-ux500/clock.c
> @@ -743,7 +743,8 @@ err_out:
>  late_initcall(clk_debugfs_init);
>  #endif /* defined(CONFIG_DEBUG_FS) */
> 
> -unsigned long clk_smp_twd_rate = 400000000;
> +/* Half the max CPU frequency on most systems (UGLY ASSUMPTION!) */
> +unsigned long clk_smp_twd_rate = 500000000;
> 
>  unsigned long clk_smp_twd_get_rate(struct clk *clk)
>  {
> @@ -769,7 +770,7 @@ static int clk_twd_cpufreq_transition(struct
> notifier_block *nb,
> 
>       if (state == CPUFREQ_PRECHANGE) {
>               /* Save frequency in simple Hz */
> -             clk_smp_twd_rate = f->new * 1000;
> +             clk_smp_twd_rate = (f->new * 1000) / 2;
>       }

Hi Linus,

That fixes the problem.

Are you planning to send a fix to lakml ?

Thanks
  -- Daniel


- -- 
 <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJO65n2AAoJEAKBbMCpUGYAe1EH/1dzBLpLhjoZsz98Sbm4X3my
PspxxHYwx00XSReuQya/ssj1Jmhtdlu+BO0sgTGZqqCEeyDs7H59dpr66Ip3n6WQ
z0heAZgqekqBLN5oBFvZb5+Z223eVv7zl0g+ksCEztWJiY7+KY46f0dpr/d435DL
6fyqg5HY24TxsVgIn6RBh3rv+zPwgN19LgwFYTRZ5toWhku88iTQXOyVpSNsB65u
VagHxvy80xKEkj/UdNLtJRVaTRDKCVyycRPYw9amgRakSZAStQl5cZjXbYYdim7R
RwpYXzPUkU24RptEd8R/zi6WYCt4VpE6Zk0RwaFwwwT/iqq+Z0oHlaiUoyv0GIM=
=XS1C
-----END PGP SIGNATURE-----

_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev

Reply via email to