The i386 and x86_64 genirq patches are wrong!

From: Eric W. Biederman
Date: Tue Jun 13 2006 - 12:34:04 EST



A little while ago I worked up some patches to that made
x86 vectors per cpu. Allowing x86 to handle more than
256 irqs, which significantly cleaned up the code.

The big stumbling block there was msi and it's totally
backwards way of allocating interrupts. Getting msi
to work with irqs and not vectors is a lot of work,
and very hard to make a clean patchset out of.

Since there has been a lot of irq work, I decided to rebase
my changes on the -mm tree so that I could catch all of
the relevant patches and be in a better shape for merging
when I am done.

The work on msi in the -mm tree while still woefully
short of making it a general piece of code seemed
to be in the right direction.

When I got to io_apic.c I screamed, things had gotten worse.

I currently have a pending bug fix that puts move_irq in
the correct place for edge and level triggered interrupts.

For edge triggered interrupts you must move the irq before
you acknowledge the interrupt, or else it can reoccur.

For level triggered interrupts you must acknowledge the irq
before you move it, or else the acknowledgement will never
find it's way back to the irq source.

I can no longer implement that bug fix in io_apic.c because
the two interrupt handling paths have been smushed together.

Previously in io_apic.c the hacks that the msi code imposed on
it were clear, and many of them were enclosed in #ifdef CONFIG_PCI_MSI.
Now that ifdefs are gone, and the logic in io_apic.h that
selected between the versions of the irq handlers to use (vector or irq)
has not been updated.

I don't know if the latter is actually a bug. But it definitely makes
it harder to remove the msi hacks, and io_apic.h should definitely
have been updated.

The fact that you I now can't put move_irq where it needs to be is definitely
a bug.

So could we please get a version the genirq patches that don't simultaneously
convert the x86 code to the new infrastructure and try and clean it up
simultaneously.

Eric
-
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/