[Top] [All Lists]

Re: [PATCH] MIPS: Add some irq definitins required by OF

To: Grant Likely <>
Subject: Re: [PATCH] MIPS: Add some irq definitins required by OF
From: David Daney <>
Date: Tue, 26 Oct 2010 15:18:38 -0700
In-reply-to: <>
Original-recipient: rfc822;
References: <> <>
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100907 Fedora/3.0.7-1.fc12 Thunderbird/3.0.7
On 10/14/2010 06:27 PM, Grant Likely wrote:
On Thu, Oct 14, 2010 at 3:02 PM, David Daney<>  wrote:

+#define NO_IRQ UINT_MAX

Really?  The verdict came down a long time ago that 0 is to be the
value that means no irq, and only a few architectures still define
NO_IRQ as -1.  It is assumed that the architectures which do not
define NO_IRQ use 0 as the invalid value.  Mostly notably x86 does not
define NO_IRQ, and Linus nack'd the patch to add it.

I was not part of that discussion.

I would however note, that all the irq functions return unsigned, so a value of -1 is meaningless. Also my understanding is that 8259 based systems use the values of 0 - 15 as the interrupt numbers, making 0 unavailable for use as NO_IRQ.

Given these constraints, UINT_MAX would seem to be a good value. It has to be defined as something *and* have global visibility, because it is part of the OF irq mapping functions API.

David Daney

<Prev in Thread] Current Thread [Next in Thread>