Re: PROBLEM: Kernel BUG in mfgpt_tick (cs5535-clockevt.c) on ALIX 2c3 - null call

From: Daniel Lezcano
Date: Thu Oct 12 2017 - 08:47:57 EST


On 11/10/2017 22:48, David Kozub wrote:

[ ... ]

>>
>> +ÂÂÂÂÂÂ disable_timer(timer);
>> +ÂÂÂÂÂÂ cs5535_mfgpt_write(timer, MFGPT_REG_COUNTER, 0);
>> +
>> ÂÂÂÂÂÂ /* Set up the IRQ on the MFGPT side */
>> ÂÂÂÂÂÂ if (cs5535_mfgpt_setup_irq(timer, MFGPT_CMP2, &timer_irq)) {
>> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ printk(KERN_ERR DRV_NAME ": Could not set up IRQ %d\n",
>
> I tried that and the handler is still called. So I did some more random
> experiments and I found out that if I call disable_timer(timer) twice,
> then the issue is resolved (the handler is not called before the
> registration is finished.) And I don't have to set MFGPT_REG_COUNTER to 0.

Aha! we are close to a fix.

> I have no idea why do I have to call disable_timer twice.

For testing purpose, can you try by adding mmiowb() and/or wmb() after
disable_timer()?




--
<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