IRQs in i2c-mpc.c

Jon Smirl jonsmirl at gmail.com
Mon Nov 12 02:34:13 EST 2007


On 11/11/07, Benjamin Herrenschmidt <benh at kernel.crashing.org> wrote:
>
> > irq_of_parse_and_map() returns NO_IRQ when the irq parameter is missing.
> >
> > This API appears to be broken. In asm-powerpc/irq.h NO_IRQ is defined
> > as (0). There is no way to tell an error in the attribute from a valid
> > attribute selecting interrupt zero.
>
> No, it is not broken. Interrupt numbers in arch/powerpc are virtually
> mapped and 0 is never a legal value, thus NO_IRQ is 0. This was done in
> part because Linus wanted it that way.
>
> The hardware number can perfectly be 0 though, that's a different thing,
> and has nothing to do with what you pass to request_irq().

Is the only error return from irq_of_parse_and_map() NO_IRQ? or can we
get standard negative returns? I started tracing out the returns from
irq_of_parse_and_map() but there are a lot of them.

-- 
Jon Smirl
jonsmirl at gmail.com



More information about the Linuxppc-dev mailing list