Re: [PATCH 4/5] Centralise NO_IRQ definition
From: Matthew Wilcox
Date: Mon Nov 21 2005 - 21:45:07 EST
On Mon, Nov 21, 2005 at 01:49:45PM -0800, Linus Torvalds wrote:
> 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".
Actually, no. Here's my x86 laptop's config space ...
0000:02:06.2 System peripheral: Texas Instruments PCI1620 Firmware Loading Function (rev 01)
Subsystem: Hewlett-Packard Company: Unknown device 08b0
Flags: bus master, medium devsel, latency 64
I/O ports at 4000 [size=64]
Capabilities: [44] Power Management version 2
00: 4c 10 01 82 07 01 10 02 01 00 80 08 08 40 00 00
10: 01 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 3c 10 b0 08
30: 00 00 00 00 44 00 00 00 00 00 00 00 ff 00 07 04
Interrupt Pin is 0x3d and Interrupt Line is 0x3c. As I explained earlier,
Linux simply never reads Interrupt Line if Interrupt Pin is 0.
Anyway, this doesn't matter too much. I don't personally care about
NO_IRQ being 0 or -1; that was something benh tried to make me care
about ;-)
So, how about this for a new patch series:
- Patch 1, same as this series (it just makes sense to bounds-check in
the irq management functions).
- Patch 2, add #ifndef NO_IRQ #define NO_IRQ 0 #endif to linux/hardirq.h
- Patch 3, set dev->irq to NO_IRQ in drivers/pci/probe.c
- Patch 4, remove custom definition of NO_IRQ from pd6729
- Patch 5, use NO_IRQ in serial_core
I'll start work on that now, since that fixes the problems I care about
and doesn't negatively affect people with problems I don't care about ;-)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/