lkml.org 
[lkml]   [2005]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/5] Centralise NO_IRQ definition
Linus Torvalds writes:

> On all PC hardware, having a zero in the PCI irq register basically means
> that no irq is enabled. That's a _fact_. It's a fact however much you may
> not like it. It's how the hardware comes up, and it's how the BIOS leaves
> it. So "0" absolutely does mean "not allocated".

First, are you talking about the interrupt pin register or the
interrupt line register?

Secondly, I would say that any driver that looks at either of those
registers is broken. Drivers should be looking at dev->irq, which is
set up by platform code, and may be quite different from what is in
the interrupt line register.

So the question of what PCI devices do with the value in the interrupt
line register is pretty much irrelevant. Those few devices that can
control their interrupt routing (such as cardbus bridges) don't use
the interrupt line register for that AFAIK.

I think all we need is for the convention for drivers to be that they
test for whether the device has an interrupt is to test (dev->irq !=
NO_IRQ). Then x86 can have NO_IRQ = 0 and PPC can have NO_IRQ = -1
and I think everyone is happy (well, nearly everyone, anyway :).

Paul.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-11-22 00:23    [W:0.101 / U:1.904 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site