summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/nmi.c
diff options
context:
space:
mode:
authortegge <tegge@FreeBSD.org>1998-03-03 22:56:30 +0000
committertegge <tegge@FreeBSD.org>1998-03-03 22:56:30 +0000
commit9f3982f0f6d7493912022ff7b37436e9d976fb84 (patch)
tree2f6bf35c42516c9c0cdb317a15559bbb0da91450 /sys/i386/isa/nmi.c
parentbeae57c5b35bad7c8aa9705208f9552264588380 (diff)
downloadFreeBSD-src-9f3982f0f6d7493912022ff7b37436e9d976fb84.zip
FreeBSD-src-9f3982f0f6d7493912022ff7b37436e9d976fb84.tar.gz
When entering the apic version of slow interrupt handler, level
interrupts are masked, and EOI is sent iff the corresponding ISR bit is set in the local apic. If the CPU cannot obtain the interrupt service lock (currently the global kernel lock) the interrupt is forwarded to the CPU holding that lock. Clock interrupts now have higher priority than other slow interrupts.
Diffstat (limited to 'sys/i386/isa/nmi.c')
-rw-r--r--sys/i386/isa/nmi.c38
1 files changed, 26 insertions, 12 deletions
diff --git a/sys/i386/isa/nmi.c b/sys/i386/isa/nmi.c
index 4a593ea7..0cdbfc0 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.7 1997/09/28 15:48:34 mckay Exp $
+ * $Id: intr_machdep.c,v 1.8 1998/02/09 06:08:30 eivind Exp $
*/
#include "opt_auto_eoi.h"
@@ -444,19 +444,30 @@ icu_setup(int intr, inthand2_t *handler, void *arg, u_int *maskptr, int flags)
vector = TPR_FAST_INTS + intr;
setidt(vector, fastintr[intr],
SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
-
- /*
- * 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);
}
- else
- setidt(TPR_SLOW_INTS + intr, slowintr[intr],
+ else {
+ vector = TPR_SLOW_INTS + intr;
+#ifdef APIC_INTR_REORDER
+#ifdef APIC_INTR_HIGHPRI_CLOCK
+ /* XXX: Hack (kludge?) for more accurate clock. */
+ if (intr == 0 || intr == 8) {
+ vector = TPR_FAST_INTS + intr;
+ }
+#endif
+#endif
+ setidt(vector, slowintr[intr],
SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
-
+ }
+#ifdef APIC_INTR_REORDER
+ 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);
#else
setidt(ICU_OFFSET + intr,
flags & INTR_FAST ? fastintr[intr] : slowintr[intr],
@@ -505,6 +516,9 @@ icu_unset(intr, handler)
setidt(flags & INTR_FAST ? TPR_FAST_INTS + intr : TPR_SLOW_INTS + intr,
slowintr[intr], SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
#else /* FAST_HI */
+#ifdef APIC_INTR_REORDER
+ set_lapic_isrloc(intr, ICU_OFFSET + intr);
+#endif
setidt(ICU_OFFSET + intr, slowintr[intr], SDT_SYS386IGT, SEL_KPL,
GSEL(GCODE_SEL, SEL_KPL));
#endif /* FAST_HI */
OpenPOWER on IntegriCloud