From: EXTERNAL B. M. (P. ST-FIR/Eng) <ext...@de...> - 2007-08-14 07:42:55
|
Greetings ... > I wanted to keep it semi-secret ... That reminds me on your way you access arrays ;-) I've never seen things like data[!primary] before and was really surprised it works. What about=20 data[1 - primary] or data[1 ^ primary] If you ask me this is easier to understand and more important this complies with any C implementation. The C standard defines false as 0 and any other value is defined as true. So !0 could be anything. >> The code doesn't work for processors without mask registers. >=20 > Is that so? I've tried the code on sh7750 among other cpus without any > problems. But I may of course have missed something... >=20 > Just to clarify (you probably know this already, but anyway): >=20 > The intc code requires at least one way to mask an interrupt.=20 Yes I already ran into BUG_ON(!data[primary]) ;-) > You cannot set priorities for interrupt source with priority as > primary masking method, right? It sure looks like a bug. Thank you for > spending time on tracking this down. >=20 Right! > I'll post fixes in a little while. Thank you! Great! I'm looking forward to your fix.=20 I'm already cleaning up my SH7720 patch, so I will send it out the next days. Regards Markus |