summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/intr_machdep.c
diff options
context:
space:
mode:
authorfsmp <fsmp@FreeBSD.org>1997-08-30 08:08:10 +0000
committerfsmp <fsmp@FreeBSD.org>1997-08-30 08:08:10 +0000
commite2310cdbcf324f3bbeda76add82e773d37ee43cd (patch)
treeab2ac308116ca3f26a9055eae17d100d5901e501 /sys/i386/isa/intr_machdep.c
parent62dbf14e9ad4dbe9bc03c2657d854b47ef4b3f65 (diff)
downloadFreeBSD-src-e2310cdbcf324f3bbeda76add82e773d37ee43cd.zip
FreeBSD-src-e2310cdbcf324f3bbeda76add82e773d37ee43cd.tar.gz
Another round of lock pushdown.
Add a simplelock to deal with disable_intr()/enable_intr() as used in UP kernel. UP kernel expects that this is enough to guarantee exclusive access to regions of code bracketed by these 2 functions. Add a simplelock to bracket clock accesses in clock.c: clock_lock. Help from: Bruce Evans <bde@zeta.org.au>
Diffstat (limited to 'sys/i386/isa/intr_machdep.c')
-rw-r--r--sys/i386/isa/intr_machdep.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/i386/isa/intr_machdep.c b/sys/i386/isa/intr_machdep.c
index c9b5da5..fd836dd 100644
--- a/sys/i386/isa/intr_machdep.c
+++ b/sys/i386/isa/intr_machdep.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
- * $Id: intr_machdep.c,v 1.1 1997/08/29 18:38:35 smp Exp smp $
+ * $Id: intr_machdep.c,v 1.5 1997/08/29 18:45:19 fsmp Exp $
*/
#include "opt_auto_eoi.h"
@@ -451,6 +451,7 @@ icu_setup(int intr, inthand2_t *handler, void *arg, u_int *maskptr, int flags)
SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));
#endif /* FAST_HI */
INTREN(1 << intr);
+ MPINTR_UNLOCK();
write_eflags(ef);
return (0);
}
@@ -487,8 +488,15 @@ icu_unset(intr, handler)
intr_mptr[intr] = NULL;
intr_mask[intr] = HWI_MASK | SWI_MASK;
intr_unit[intr] = intr;
+#ifdef FAST_HI_XXX
+ /* XXX how do I re-create dvp here? */
+ 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 */
setidt(ICU_OFFSET + intr, slowintr[intr], SDT_SYS386IGT, SEL_KPL,
GSEL(GCODE_SEL, SEL_KPL));
+#endif /* FAST_HI */
+ MPINTR_UNLOCK();
write_eflags(ef);
return (0);
}
OpenPOWER on IntegriCloud