]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] x86_64 irq: Safely cleanup an irq after moving it.
authorEric W. Biederman <ebiederm@xmission.com>
Fri, 23 Feb 2007 11:40:58 +0000 (04:40 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 26 Feb 2007 18:34:08 +0000 (10:34 -0800)
commita36952048d5d3516cbe6c7ff276a9c5f29531221
tree600c115072fc5f28c07dddfbe52f0dcf376d8504
parent47c634eb835cbf39fc50c25ba03909f5300fdecd
[PATCH] x86_64 irq: Safely cleanup an irq after moving it.

The problem:  After moving an interrupt when is it safe to teardown
the data structures for receiving the interrupt at the old location?

With a normal pci device it is possible to issue a read to a device
to flush all posted writes.  This does not work for the oldest ioapics
because they are on a 3-wire apic bus which is a completely different
data path.  For some more modern ioapics when everything is using
front side bus delivery you can flush interrupts by simply issuing a
read to the ioapic.  For other modern ioapics emperical testing has
shown that this does not work.

So it appears the only reliable way to know the last of the irqs from an
ioapic have been received from before the ioapic was reprogrammed is to
received the first irq from the ioapic from after it was reprogrammed.

Once we know the last irq message has been received from an ioapic
into a local apic we then need to know that irq message has been
processed through the local apics.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86_64/kernel/entry.S
arch/x86_64/kernel/i8259.c
arch/x86_64/kernel/io_apic.c
include/asm-x86_64/hw_irq.h