All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Jon Smirl <jonsmirl@gmail.com>
Cc: PowerPC dev list <Linuxppc-dev@ozlabs.org>
Subject: Re: IRQs in i2c-mpc.c
Date: Sun, 11 Nov 2007 17:27:51 +1100	[thread overview]
Message-ID: <1194762471.21340.39.camel@pasglop> (raw)
In-Reply-To: <9e4733910711101544v178e29cer4e53577c011e89f7@mail.gmail.com>


> 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().

Ben.

  reply	other threads:[~2007-11-11  6:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-10 19:44 IRQs in i2c-mpc.c Jon Smirl
2007-11-10 23:09 ` Kumar Gala
2007-11-10 23:16   ` Jon Smirl
2007-11-10 23:18     ` Kumar Gala
2007-11-10 23:44       ` Jon Smirl
2007-11-11  6:27         ` Benjamin Herrenschmidt [this message]
2007-11-11 15:34           ` Jon Smirl
2007-11-11 20:44             ` Benjamin Herrenschmidt
2007-11-11  6:26       ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1194762471.21340.39.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=Linuxppc-dev@ozlabs.org \
    --cc=jonsmirl@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.