[RFC PATCH 11/19] powerpc: gamecube/wii: flipper interrupt controller support

Albert Herranz albert_herranz at yahoo.es
Fri Nov 27 02:33:16 EST 2009


Benjamin Herrenschmidt wrote:
> On Sun, 2009-11-22 at 16:28 -0700, Grant Likely wrote:
>>> +unsigned int flipper_pic_get_irq(void)
>>> +{
>>> +       void __iomem *io_base = flipper_irq_host->host_data;
>>> +       int irq;
>>> +       u32 irq_status;
>>> +
>>> +       irq_status = in_be32(io_base + FLIPPER_ICR) &
>>> +                    in_be32(io_base + FLIPPER_IMR);
>>> +       if (irq_status == 0)
>>> +               return -1;      /* no more IRQs pending */
>> NO_IRQ_IGNORE 
> 
> Why no just 0 ? (aka NO_IRQ)
> 

I didn't know about 0 (I thought that was another valid interrupt).
I was used to -1 to tell that no IRQs were pending (at least from the ARCH=ppc days) :)

> Or do you know you are getting lots of spurrious that you don't want to
> account ?
> 

No, this is not the case here.

> Cheers,
> Ben.
> 

Thanks,
Albert



More information about the Linuxppc-dev mailing list