From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: David Brownell <david-b@pacbell.net>
Cc: lkml <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
hpa@zytor.com
Subject: Re: [patch] x86 supports NO_IRQ convention
Date: Mon, 23 Jun 2008 20:42:31 +1000 [thread overview]
Message-ID: <1214217751.8011.262.camel@pasglop> (raw)
In-Reply-To: <200806221953.18849.david-b@pacbell.net>
On Sun, 2008-06-22 at 19:53 -0700, David Brownell wrote:
> Hmm, x86 doesn't seem to support the NO_IRQ convention. This means
> that portable code can't use it. Which in turn means that there's
> no portable way for drivers to know whether they have been handed a
> valid IRQ number (zero usually being valid). Double-plus ungood.
>
> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
> ---
> I suspect this has been discussed before, but I can't find any
> written resolution ...
>
> include/asm-x86/irq.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> --- a/include/asm-x86/irq.h 2008-06-22 16:36:43.000000000 -0700
> +++ b/include/asm-x86/irq.h 2008-06-22 16:37:06.000000000 -0700
> @@ -3,3 +3,7 @@
> #else
> # include "irq_64.h"
> #endif
> +
> +#ifndef NO_IRQ
> +#define NO_IRQ ((unsigned int)(-1))
> +#endif
NO_IRQ on x86 is 0
In fact, we explicitely changed powerpc to do the same :-) (It became
easy after I made all linux irqs be virtual, and dynamically mapped to
physical numbers).
I think Linus wants everybody to follow...
Cheers,
Ben.
next prev parent reply other threads:[~2008-06-23 10:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-23 2:53 [patch] x86 supports NO_IRQ convention David Brownell
2008-06-23 9:08 ` Alan Cox
2008-06-23 11:29 ` David Brownell
2008-06-23 14:20 ` Alan Cox
2008-06-23 11:34 ` Johannes Stezenbach
2008-06-23 10:42 ` Benjamin Herrenschmidt [this message]
2008-06-23 11:28 ` David Brownell
2008-06-23 20:06 ` Benjamin Herrenschmidt
[not found] <fa.mcHAIQmpGZB1Vrm7ZD4/q9eo08Y@ifi.uio.no>
[not found] ` <fa.E+RvbN2EFmsI1cxQ84PIB8FbX50@ifi.uio.no>
[not found] ` <fa.EDfpY1oxab2UaliWrUY0jyr5T1k@ifi.uio.no>
2008-06-24 2:20 ` Robert Hancock
2008-06-24 6:39 ` David Brownell
2008-06-24 9:12 ` Alan Cox
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=1214217751.8011.262.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=david-b@pacbell.net \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox