[PATCH] x86_64 irq: In __DO_ACTION perform the FINAL action for every entry.
authorEric W. Biederman <ebiederm@xmission.com>
Fri, 23 Feb 2007 11:23:52 +0000 (04:23 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 26 Feb 2007 18:34:08 +0000 (10:34 -0800)
If we have an irq that comes from multiple io_apic pins the FINAL action
(which is io_apic_sync or nothing) needs to be called for every entry or
else if the two pins come from different io_apics we may not wait until
after the action happens on the io_apic.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86_64/kernel/io_apic.c

index 74671defbbe3d145b8b1d4401728a7e21223a86d..52fc19ba2b98b022614a2f9dda0a58230ea70989 100644 (file)
@@ -149,11 +149,11 @@ static inline void io_apic_sync(unsigned int apic)
                reg = io_apic_read(entry->apic, 0x10 + R + pin*2);      \
                reg ACTION;                                             \
                io_apic_modify(entry->apic, reg);                       \
+               FINAL;                                                  \
                if (!entry->next)                                       \
                        break;                                          \
                entry = irq_2_pin + entry->next;                        \
        }                                                               \
-       FINAL;                                                          \
 }
 
 union entry_union {