On 05/05/2011 06:37 PM, Gilles Chanteperdrix wrote: > On 05/05/2011 02:20 PM, Alexey Galakhov wrote: >> Hi, >> >> I'm still trying to debug ipipe on the mini2440 board (linux 2.6.35.9 + >> ipipe 1.18.01 + Gilles' ARM patches). Now I encounter the following >> problem. If any Xenomai skin module is loaded the system hangs. In fact, >> it goes into sleep with interrupts off. >> >> The sleep was in pm_idle() and it is done correctly. The problem lies >> somewhere else. I tried to use busy-loop instead of sleep, like that: >> >> - if (hlt_counter) { >> + if (1 || hlt_counter) { >> >> in cpu_idle() (arch/arm/kernel/process.c). Now I found that the loop >> "while (!need_resched())" never exits, need_resched() is always >> returning false and there are no interrupts. Looks like the timer >> interrupt either stops ticking or is masked out since xenomai skin is >> loaded. >> >> Can you please help to debug it? > You should make sure that pm_idle == default_idle. In this case, > __ipipe_halt_root is called instead of arch_idle, and everything should > work. I double-checked this. Yes, __ipipe_halt_root is called.
If I just run the kernel "as is", it hangs with the following stack: s3c24xx_default_idle (sleep is done correctly, no IRQs are coming!) arch_idle __ipipe_halt_root cpu_idle To ensure the timer is not stopped when CPU going to sleep, I hacked s3cxx_default_idle by replacing its entire contents with for (i = 0; i < 10000; ++i) { __asm__ __volatile__ ("nop"); } return; Now I'm sure timers aren't blocked by the sleep command. Now the debugger shows that it enters __ipipe_halt_root and s3cxx_default_idle over and over again, nothiung else seems to happen. -- Alex _______________________________________________ Adeos-main mailing list Adeos-main@gna.org https://mail.gna.org/listinfo/adeos-main