Hi, On Wednesday 17 March 2010 00:15:48 Michael Walle wrote: > Am Tuesday 16 March 2010 15:53:41 schrieb Sébastien Bourdeauducq: > > Therefore, it gets ALL interrupts (masked or not). We should AND register > > IP with register IM. > > yep. imho that should be done within the asm code.
Yes, but this requires extra asm instructions that no longer fit between two LM32 exception vectors and therefore a jump is needed. I wanted to avoid it, that's why I did it this way. But since it is inconsistent with other Linux ports, I will change it. > other linux ports pass only one single irq number to do_IRQ(). > > What about the following steps: > 1. interrupt vector gets called > 2. save regs > 3. r2 <- IM & IP > 4. find position of first bit set in r2, store it in r1 > (4a. r2 <- pt_regs) > 5. mask irq > 6. call do_IRQ (which only takes one irq number) > 7. ack irq > 8. unmask irq > 9. restore regs > 10. eret > > Processing only one interrupt at a time should avoid the second problem, > mentioned above. Sounds good. It takes more CPU cycles to achieve the same thing when interrupts come at the same time, but since I guess this rarely happens, the small performance improvement is not worth the cost of doing differently than other Linux ports. > do_IRQ() just calls irq_enter/exit generic_handle_irq. > > > Do you see a particular reason for using the lm32_current_irq_mask > > "cache", or is it just Theobroma's programmers being stupid? > > Nope, maybe it had something to do with that IPIPE thing. Imho it should be > removed. Ok. Let's do that then. Thanks, Sébastien _______________________________________________ http://lists.milkymist.org/listinfo.cgi/devel-milkymist.org IRC: #milkym...@freenode Webchat: www.milkymist.org/irc.html Wiki: www.milkymist.org/wiki
