| To: | Grant Likely <grant.likely@secretlab.ca> |
|---|---|
| Subject: | Re: [PATCH] MIPS: Add some irq definitins required by OF |
| From: | David Daney <ddaney@caviumnetworks.com> |
| Date: | Tue, 26 Oct 2010 15:18:38 -0700 |
| Cc: | linux-mips@linux-mips.org, ralf@linux-mips.org |
| In-reply-to: | <AANLkTi=M0Fk5EGy+JB2CZcGxspv3hPde10A-R5sUs3Jq@mail.gmail.com> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <1287090174-15601-1-git-send-email-ddaney@caviumnetworks.com> <AANLkTi=M0Fk5EGy+JB2CZcGxspv3hPde10A-R5sUs3Jq@mail.gmail.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
| User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) 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<ddaney@caviumnetworks.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. David Daney |
| <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] |