summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2011-01-13 17:00:22 +0000
committerjhb <jhb@FreeBSD.org>2011-01-13 17:00:22 +0000
commitcfd16f712573032be1fa07106485eb0667fa7411 (patch)
treebfa614e1497554b75209bc2819f61899041b525b /sys/i386
parentd0e4f29150b70c6db15b3bb2245e00de82a7cb7d (diff)
downloadFreeBSD-src-cfd16f712573032be1fa07106485eb0667fa7411.zip
FreeBSD-src-cfd16f712573032be1fa07106485eb0667fa7411.tar.gz
If an interrupt on an I/O APIC is moved to a different CPU after it has
started to execute, it seems that the corresponding ISR bit in the "old" local APIC can be cleared. This causes the local APIC interrupt routine to fail to find an interrupt to service. Rather than panic'ing in this case, simply return from the interrupt without sending an EOI to the local APIC. If there are any other pending interrupts in other ISR registers, the local APIC will assert a new interrupt. Tested by: steve
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/apic_vector.s10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/i386/i386/apic_vector.s b/sys/i386/i386/apic_vector.s
index 100ce90..86e78c4 100644
--- a/sys/i386/i386/apic_vector.s
+++ b/sys/i386/i386/apic_vector.s
@@ -60,18 +60,16 @@ IDTVEC(vec_name) ; \
FAKE_MCOUNT(TF_EIP(%esp)) ; \
movl lapic, %edx ; /* pointer to local APIC */ \
movl LA_ISR + 16 * (index)(%edx), %eax ; /* load ISR */ \
- bsrl %eax, %eax ; /* index of highset set bit in ISR */ \
- jz 2f ; \
+ bsrl %eax, %eax ; /* index of highest set bit in ISR */ \
+ jz 1f ; \
addl $(32 * index),%eax ; \
-1: ; \
pushl %esp ; \
pushl %eax ; /* pass the IRQ */ \
call lapic_handle_intr ; \
addl $8, %esp ; /* discard parameter */ \
+1: ; \
MEXITCOUNT ; \
- jmp doreti ; \
-2: movl $-1, %eax ; /* send a vector of -1 */ \
- jmp 1b
+ jmp doreti
/*
* Handle "spurious INTerrupts".
OpenPOWER on IntegriCloud