On Sat, 2009-11-28 at 21:43 +0100, Albert Herranz wrote: > +static void flipper_pic_mask_and_ack(unsigned int virq) > +{ > + int irq = virq_to_hw(virq); > + void __iomem *io_base = get_irq_chip_data(virq); > + u32 mask = 1 << irq; > + > + clrbits32(io_base + FLIPPER_IMR, mask); > + /* this is at least needed for RSW */ > + out_be32(io_base + FLIPPER_ICR, mask); > +}
That's a lot better. You probably still need to also read back to make sure the line is properly de-asserted before you return... but if you don't observe spurrious interrupts then it probably doesn't matter much. No big deal either way though, change it if you want but I'm not going to nack it if you don't :-) You can also save cycles by avoiding the read/modify/write by storing a memory cache of what the mask should be. MMIO reads tend to be slow. Cheers, Ben. _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev