From: Paul Mundt <lethal@linux-sh.org>
To: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: linuxppc-dev@ozlabs.org, Jeff Garzik <jgarzik@pobox.com>,
linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
Tejun Heo <tj@kernel.org>, Li Yang <leoli@freescale.com>,
David Woodhouse <dwmw2@infradead.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
Wang Jian <lark@linux.net.cn>
Subject: Re: [PATCH] pata_of_platform: fix no irq handling
Date: Sat, 11 Oct 2008 02:55:17 +0900 [thread overview]
Message-ID: <20081010175516.GD10579@linux-sh.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0810081159240.24611@vixen.sonytel.be>
On Wed, Oct 08, 2008 at 11:59:59AM +0200, Geert Uytterhoeven wrote:
> On Wed, 8 Oct 2008, Alan Cox wrote:
> > On Wed, 08 Oct 2008 09:40:54 +0100
> > David Woodhouse <dwmw2@infradead.org> wrote:
> >
> > > On Tue, 2008-10-07 at 10:37 +0100, Alan Cox wrote:
> > > > Zero means no IRQ. Any platform with bits of code left over exposing IRQ
> > > > 0 is already not supported by lots of driver code including libata.
> > >
> > > ...and must implement some kind of interrupt remapping crap just to work
> > > around this bogus design decision.
> >
> > I'll leave you to argue with Linus about that, but since that was the
> > decision back in 2005 (for good C reasons) we can safely rely on it.
>
> `git grep NO_IRQ include arch/*/include' is still quite enlightening...
>
In the case of PCI where IRQ is unsigned int, that's certainly bogus. The
problem originates on platforms where a 1:1 mapping between vector and
IRQ exists, where 0 is a valid value. This then needs to be remapped in
to an IRQ cookie that has a non-0 value in order to be assigned to
dev->irq. Despite whether this is bogus or not, there's not much to be
done about it. Those of us with vectored IRQ platforms generally have
enough sources that the use of IRQ-0 doesn't matter, and it's not worth
the headache of setting up the remapping crap.
As an example, on SH, IRQ-0 is mapped to vector 0x200. It is '0' for
symbolic reasons only. It's just as easy to pad out irq_desc and treat it
as an off-by-1 to work around all of code that assumes NO_IRQ == 0. There
is enough code in the kernel today that makes the non-zero IRQ cookie
assumption that platforms that do otherwise are simply broken.
next prev parent reply other threads:[~2008-10-10 17:55 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-06 17:26 [PATCH] pata_of_platform: fix no irq handling Anton Vorontsov
2008-10-06 20:41 ` Matt Sealey
2008-10-06 21:32 ` Anton Vorontsov
2008-10-07 1:30 ` Tejun Heo
2008-10-07 9:18 ` Wang Jian
2008-10-07 9:26 ` Anton Vorontsov
2008-10-07 10:04 ` Benjamin Herrenschmidt
2008-10-07 9:37 ` Alan Cox
2008-10-08 8:40 ` David Woodhouse
2008-10-08 9:00 ` Alan Cox
2008-10-08 9:59 ` Geert Uytterhoeven
2008-10-08 10:27 ` Alan Cox
2008-10-10 17:55 ` Paul Mundt [this message]
2008-10-13 6:56 ` Tejun Heo
2008-10-13 23:27 ` Benjamin Herrenschmidt
-- strict thread matches above, loose matches on Subject: below --
2008-09-25 8:36 [PATCH] pata_platform struct resource signness fix Wang Jian
2008-09-25 8:54 ` Wang Jian
2008-09-25 10:40 ` Li Yang
2008-09-25 10:48 ` Anton Vorontsov
2008-09-29 4:19 ` Jeff Garzik
2008-09-29 13:32 ` [PATCH] pata_of_platform: fix no irq handling Anton Vorontsov
2008-08-11 14:48 Possible bug in IRQ handling in pata_of_platform / pata_platform Steven A. Falco
2008-08-11 15:19 ` [PATCH] pata_of_platform: fix no irq handling Anton Vorontsov
2008-08-11 16:23 ` Steven A. Falco
2008-08-11 17:07 ` Anton Vorontsov
2008-08-11 22:00 ` Benjamin Herrenschmidt
2008-08-12 14:00 ` Steven A. Falco
2008-08-12 14:04 ` Anton Vorontsov
2008-08-12 14:18 ` Stefan Roese
2008-08-12 14:18 ` Sergei Shtylyov
2008-08-12 14:31 ` Anton Vorontsov
2008-08-13 21:25 ` Steven A. Falco
2008-08-11 16:29 ` Alan Cox
2008-08-11 16:36 ` Ben Dooks
2008-08-11 16:26 ` Alan Cox
2008-08-11 16:42 ` Steven A. Falco
2008-08-11 22:02 ` Benjamin Herrenschmidt
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=20081010175516.GD10579@linux-sh.org \
--to=lethal@linux-sh.org \
--cc=Geert.Uytterhoeven@sonycom.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=dwmw2@infradead.org \
--cc=jgarzik@pobox.com \
--cc=lark@linux.net.cn \
--cc=leoli@freescale.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=tj@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).