On Fri, Dec 16, 2011 at 6:56 AM, Daniel Lezcano daniel.lezcano@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%3Ba=commi...
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; }
return NOTIFY_OK;
Thanks, Linus Walleij