summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/nmi.c
diff options
context:
space:
mode:
authortegge <tegge@FreeBSD.org>1998-09-06 22:41:42 +0000
committertegge <tegge@FreeBSD.org>1998-09-06 22:41:42 +0000
commit857a03a573e70a598db37cc5e2751f5a6b09c020 (patch)
treeabbb6f5a4e56e7d82120efc18e2c6de6ec06843b /sys/i386/isa/nmi.c
parentac59a0c5cd4a2de80842186c8dd22ff48fe29da8 (diff)
downloadFreeBSD-src-857a03a573e70a598db37cc5e2751f5a6b09c020.zip
FreeBSD-src-857a03a573e70a598db37cc5e2751f5a6b09c020.tar.gz
Maintain a mapping from irq number to (ioapic number, int pin) tuple,
and use this when masking/unmasking interrupts. Maintain a mapping from (iopaic number, int pin) tuple to irq number, and use this when configuring devices and programming the ioapics. Previous code assumed that irq number was equal to int pin number, and that the ioapic number was 0. Don't let an AP enter _cpu_switch before all local apics are initialized.
Diffstat (limited to 'sys/i386/isa/nmi.c')
-rw-r--r--sys/i386/isa/nmi.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/i386/isa/nmi.c b/sys/i386/isa/nmi.c
index 49c7f24..3f891f2 100644
--- a/sys/i386/isa/nmi.c
+++ b/sys/i386/isa/nmi.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
- * $Id: intr_machdep.c,v 1.12 1998/06/18 15:32:06 bde Exp $
+ * $Id: intr_machdep.c,v 1.13 1998/06/18 16:08:46 bde Exp $
*/
#include "opt_auto_eoi.h"
@@ -429,12 +429,15 @@ icu_setup(int intr, inthand2_t *handler, void *arg, u_int *maskptr, int flags)
set_lapic_isrloc(intr, vector);
#endif
/*
- * XXX MULTIPLE_IOAPICSXXX
* Reprogram the vector in the IO APIC.
*/
- select = (intr * 2) + IOAPIC_REDTBL0;
- value = io_apic_read(0, select) & ~IOART_INTVEC;
- io_apic_write(0, select, value | vector);
+ if (int_to_apicintpin[intr].ioapic >= 0) {
+ select = int_to_apicintpin[intr].redirindex;
+ value = io_apic_read(int_to_apicintpin[intr].ioapic,
+ select) & ~IOART_INTVEC;
+ io_apic_write(int_to_apicintpin[intr].ioapic,
+ select, value | vector);
+ }
#else
setidt(ICU_OFFSET + intr,
flags & INTR_FAST ? fastintr[intr] : slowintr[intr],
OpenPOWER on IntegriCloud