public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: Linus Torvalds <torvalds@osdl.org>
Cc: David Howells <dhowells@redhat.com>,
	Andrew Morton <akpm@osdl.org>, Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org, Russell King <rmk@arm.linux.org.uk>,
	Ian Molton <spyro@f2s.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH 4/5] Centralise NO_IRQ definition
Date: Mon, 21 Nov 2005 12:06:32 -0700	[thread overview]
Message-ID: <20051121190632.GG1598@parisc-linux.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0511211047260.13959@g5.osdl.org>

On Mon, Nov 21, 2005 at 10:55:24AM -0800, Linus Torvalds wrote:
> Quite frankly, if we change [PCI_]NO_IRQ to -1, there's almost certainly 
> going to be a lot of drivers breaking.

There's only one driver using NO_IRQ today (outside of architectures
which define NO_IRQ to -1, that is).  So *this* series of patches should
break nothing.  The next series of patches should find all the PCI
drivers assuming dev->irq == 0 means no interrupt, and then we try to
break drivers by getting rid of PCI_NO_IRQ.

> This is not theory: a _lot_ of real-life PCI devices very much think that 
> irq 0 means "disabled". Not even just in drivers - in actual _hardware_. 
> When you write 0 to the irq number for irq routers, they disable that 
> line. So the "zero as NO_IRQ" is more than just a "several drivers think 
> that is how it is", it's how a lot of hardware actually works.

That's a common misreading of the PCI spec -- it actually says the
opposite.  Interrupt Pin works as you've described.  But what we're
concerned with is Interrupt Line, and PCI 2.3 has the following to say
in a footnote:

	43 For x86 based PCs, the values in this register correspond to
	IRQ numbers (0-15) of the standard dual 8259 configuration. The
	value 255 is defined as meaning "unknown" or "no connection" to
	the interrupt controller. Values between 15 and 254 are reserved.

It's just that Linux doesn't bother to read Interrupt Line if Interrupt
Pin is 0, and thus leaves the interrupt value at 0 (since the struct was
memset).

Really, this patch brings x86 back into compliance with what the
BIOS does ;-)

  reply	other threads:[~2005-11-21 19:06 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-21  1:14 [PATCH 4/5] Centralise NO_IRQ definition Matthew Wilcox
2005-11-21 11:12 ` David Howells
2005-11-21 12:14   ` Matthew Wilcox
2005-11-21 18:55     ` Linus Torvalds
2005-11-21 19:06       ` Matthew Wilcox [this message]
2005-11-21 19:27         ` Linus Torvalds
2005-11-21 19:43           ` Matthew Wilcox
2005-11-21 19:59             ` Linus Torvalds
2005-11-21 21:15               ` Ingo Molnar
2005-11-21 21:25                 ` Paul Mackerras
2005-11-21 21:35                   ` Ingo Molnar
2005-11-21 21:51                     ` Linus Torvalds
2005-11-21 22:09                       ` Benjamin Herrenschmidt
2005-11-21 22:34                         ` Linus Torvalds
2005-11-21 23:00                           ` Benjamin Herrenschmidt
2005-11-21 21:49                   ` Linus Torvalds
2005-11-21 22:06                     ` Benjamin Herrenschmidt
2005-11-21 22:28                       ` Linus Torvalds
2005-11-21 22:58                         ` Benjamin Herrenschmidt
2005-11-21 23:20                     ` Paul Mackerras
2005-11-22  1:26                       ` Linus Torvalds
2005-11-22  2:45                     ` Matthew Wilcox
2005-11-21 21:50                   ` Benjamin Herrenschmidt
2005-11-21 22:20                   ` Alan Cox
2005-11-22 11:13                     ` David Woodhouse
2005-11-22 14:15                       ` Alan Cox
2005-11-22 14:04                         ` Matthew Wilcox
2005-11-22 17:03                         ` Linus Torvalds
2005-11-22 18:20                           ` Matthew Wilcox
2005-11-22 18:37                           ` David Howells
2005-11-22 19:03                             ` David Woodhouse
2005-11-22 19:21                               ` Linus Torvalds
2005-11-22 23:58                                 ` David Woodhouse
2005-11-22 19:05                             ` Linus Torvalds
2005-11-22 19:38                               ` David Howells
2005-11-22 19:51                                 ` Linus Torvalds
2005-11-23  1:45                 ` Pavel Machek
2005-11-21 21:16               ` Benjamin Herrenschmidt
2005-11-21 21:38                 ` Linus Torvalds
2005-11-21 21:53                   ` Benjamin Herrenschmidt
2005-11-21 22:18                     ` Linus Torvalds
2005-11-21 22:20                       ` 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=20051121190632.GG1598@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=akpm@osdl.org \
    --cc=benh@kernel.crashing.org \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=spyro@f2s.com \
    --cc=torvalds@osdl.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