|To:||Grant Likely <email@example.com>|
|Subject:||Re: [PATCH] MIPS: Add some irq definitins required by OF|
|From:||David Daney <firstname.lastname@example.org>|
|Date:||Tue, 26 Oct 2010 15:18:38 -0700|
|User-agent:||Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:188.8.131.52) 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<email@example.com> wrote:
+#define NO_IRQ UINT_MAXReally? 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.
|<Prev in Thread]||Current Thread||[Next in Thread>|
|Previous by Date:||[PATCH] OF device tree: Move of_get_mac_address() to a common source file., David Daney|
|Next by Date:||Re: [PATCH] MIPS: Add some irq definitins required by OF, Grant Likely|
|Previous by Thread:||Re: [PATCH] MIPS: Add some irq definitins required by OF, Grant Likely|
|Next by Thread:||Re: [PATCH] MIPS: Add some irq definitins required by OF, Grant Likely|
|Indexes:||[Date] [Thread] [Top] [All Lists]|