diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2015-07-16 05:10:15 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2015-07-16 05:10:15 +0000 |
commit | 6c55f05c348ad63d4f9cf6541b718b1802b42b4a (patch) | |
tree | 913e26036cbda3b9f1b7f5995bde34f5bfc44f7c /sys/arch/i386 | |
parent | 1f2303bb4ce44154fd7b3a05289808aea46b037b (diff) |
Move grab/release of the kernel_lock for softintrs from the ASM stubs to
softintr_dispatch(). Delete traces of long superseded stats code.
ok beck@ mpi@ uebayasi@
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/i386/apicvec.s | 20 | ||||
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 16 | ||||
-rw-r--r-- | sys/arch/i386/i386/softintr.c | 4 | ||||
-rw-r--r-- | sys/arch/i386/include/intr.h | 6 | ||||
-rw-r--r-- | sys/arch/i386/isa/icu.s | 20 |
5 files changed, 7 insertions, 59 deletions
diff --git a/sys/arch/i386/i386/apicvec.s b/sys/arch/i386/i386/apicvec.s index 237def059bf..dd17c7875d7 100644 --- a/sys/arch/i386/i386/apicvec.s +++ b/sys/arch/i386/i386/apicvec.s @@ -1,4 +1,4 @@ -/* $OpenBSD: apicvec.s,v 1.30 2015/06/28 01:11:27 guenther Exp $ */ +/* $OpenBSD: apicvec.s,v 1.31 2015/07/16 05:10:14 guenther Exp $ */ /* $NetBSD: apicvec.s,v 1.1.2.2 2000/02/21 21:54:01 sommerfeld Exp $ */ /*- @@ -182,15 +182,9 @@ XINTR(softclock): ioapic_asm_ack() sti incl CPUVAR(IDEPTH) -#ifdef MULTIPROCESSOR - call _C_LABEL(i386_softintlock) -#endif pushl $I386_SOFTINTR_SOFTCLOCK call _C_LABEL(softintr_dispatch) addl $4,%esp -#ifdef MULTIPROCESSOR - call _C_LABEL(i386_softintunlock) -#endif decl CPUVAR(IDEPTH) jmp _C_LABEL(Xdoreti) @@ -204,15 +198,9 @@ XINTR(softnet): ioapic_asm_ack() sti incl CPUVAR(IDEPTH) -#ifdef MULTIPROCESSOR - call _C_LABEL(i386_softintlock) -#endif pushl $I386_SOFTINTR_SOFTNET call _C_LABEL(softintr_dispatch) addl $4,%esp -#ifdef MULTIPROCESSOR - call _C_LABEL(i386_softintunlock) -#endif decl CPUVAR(IDEPTH) jmp _C_LABEL(Xdoreti) #undef DONETISR @@ -227,15 +215,9 @@ XINTR(softtty): ioapic_asm_ack() sti incl CPUVAR(IDEPTH) -#ifdef MULTIPROCESSOR - call _C_LABEL(i386_softintlock) -#endif pushl $I386_SOFTINTR_SOFTTTY call _C_LABEL(softintr_dispatch) addl $4,%esp -#ifdef MULTIPROCESSOR - call _C_LABEL(i386_softintunlock) -#endif decl CPUVAR(IDEPTH) jmp _C_LABEL(Xdoreti) diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 74ffa958595..265fe92a8ed 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.571 2015/06/07 06:24:59 guenther Exp $ */ +/* $OpenBSD: machdep.c,v 1.572 2015/07/16 05:10:14 guenther Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -3887,20 +3887,6 @@ splassert_check(int wantipl, const char *func) } #endif -#ifdef MULTIPROCESSOR -void -i386_softintlock(void) -{ - __mp_lock(&kernel_lock); -} - -void -i386_softintunlock(void) -{ - __mp_unlock(&kernel_lock); -} -#endif - /* * True if the system has any non-level interrupts which are shared * on the same pin. diff --git a/sys/arch/i386/i386/softintr.c b/sys/arch/i386/i386/softintr.c index 778af9ca918..fe236a86447 100644 --- a/sys/arch/i386/i386/softintr.c +++ b/sys/arch/i386/i386/softintr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softintr.c,v 1.5 2014/07/12 18:44:41 tedu Exp $ */ +/* $OpenBSD: softintr.c,v 1.6 2015/07/16 05:10:14 guenther Exp $ */ /* $NetBSD: softintr.c,v 1.1 2003/02/26 21:26:12 fvdl Exp $ */ /*- @@ -79,6 +79,7 @@ softintr_dispatch(int which) struct i386_soft_intr *si = &i386_soft_intrs[which]; struct i386_soft_intrhand *sih; + KERNEL_LOCK(); for (;;) { mtx_enter(&si->softintr_lock); sih = TAILQ_FIRST(&si->softintr_q); @@ -95,6 +96,7 @@ softintr_dispatch(int which) (*sih->sih_fn)(sih->sih_arg); } + KERNEL_UNLOCK(); } /* diff --git a/sys/arch/i386/include/intr.h b/sys/arch/i386/include/intr.h index 8716a2c3c68..491312da63a 100644 --- a/sys/arch/i386/include/intr.h +++ b/sys/arch/i386/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.44 2014/03/29 18:09:29 guenther Exp $ */ +/* $OpenBSD: intr.h,v 1.45 2015/07/16 05:10:14 guenther Exp $ */ /* $NetBSD: intr.h,v 1.5 1996/05/13 06:11:28 mycroft Exp $ */ /* @@ -135,10 +135,6 @@ int i386_send_ipi(struct cpu_info *, int); int i386_fast_ipi(struct cpu_info *, int); void i386_broadcast_ipi(int); void i386_ipi_handler(void); -void i386_intlock(int); -void i386_intunlock(int); -void i386_softintlock(void); -void i386_softintunlock(void); void i386_setperf_ipi(struct cpu_info *); extern void (*ipifunc[I386_NIPI])(struct cpu_info *); diff --git a/sys/arch/i386/isa/icu.s b/sys/arch/i386/isa/icu.s index 8b77101f110..022e8d3e3dc 100644 --- a/sys/arch/i386/isa/icu.s +++ b/sys/arch/i386/isa/icu.s @@ -1,4 +1,4 @@ -/* $OpenBSD: icu.s,v 1.32 2015/06/28 01:11:27 guenther Exp $ */ +/* $OpenBSD: icu.s,v 1.33 2015/07/16 05:10:14 guenther Exp $ */ /* $NetBSD: icu.s,v 1.45 1996/01/07 03:59:34 mycroft Exp $ */ /*- @@ -119,30 +119,18 @@ IDTVEC(softtty) movl $IPL_SOFTTTY,%eax movl %eax,CPL sti -#ifdef MULTIPROCESSOR - call _C_LABEL(i386_softintlock) -#endif pushl $I386_SOFTINTR_SOFTTTY call _C_LABEL(softintr_dispatch) addl $4,%esp -#ifdef MULTIPROCESSOR - call _C_LABEL(i386_softintunlock) -#endif jmp *%esi IDTVEC(softnet) movl $IPL_SOFTNET,%eax movl %eax,CPL sti -#ifdef MULTIPROCESSOR - call _C_LABEL(i386_softintlock) -#endif pushl $I386_SOFTINTR_SOFTNET call _C_LABEL(softintr_dispatch) addl $4,%esp -#ifdef MULTIPROCESSOR - call _C_LABEL(i386_softintunlock) -#endif jmp *%esi #undef DONETISR @@ -150,14 +138,8 @@ IDTVEC(softclock) movl $IPL_SOFTCLOCK,%eax movl %eax,CPL sti -#ifdef MULTIPROCESSOR - call _C_LABEL(i386_softintlock) -#endif pushl $I386_SOFTINTR_SOFTCLOCK call _C_LABEL(softintr_dispatch) addl $4,%esp -#ifdef MULTIPROCESSOR - call _C_LABEL(i386_softintunlock) -#endif jmp *%esi |