From: David Daney <ddaney@caviumnetworks.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: Re: [PATCH] MIPS: Add some irq definitins required by OF
Date: Tue, 26 Oct 2010 15:18:38 -0700 [thread overview]
Message-ID: <4CC753BE.5010705@caviumnetworks.com> (raw)
In-Reply-To: <AANLkTi=M0Fk5EGy+JB2CZcGxspv3hPde10A-R5sUs3Jq@mail.gmail.com>
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_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
next prev parent reply other threads:[~2010-10-26 22:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-14 21:02 [PATCH] MIPS: Add some irq definitins required by OF David Daney
2010-10-15 1:27 ` Grant Likely
2010-10-15 19:50 ` David Daney
2010-10-15 19:55 ` Grant Likely
2010-10-26 22:18 ` David Daney [this message]
2010-10-27 8:10 ` Grant Likely
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=4CC753BE.5010705@caviumnetworks.com \
--to=ddaney@caviumnetworks.com \
--cc=grant.likely@secretlab.ca \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/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.