diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-12-21 14:56:25 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-12-21 14:56:25 +0000 |
commit | b45bcd941aeed9f9b5bca41338e52b47d57e7e43 (patch) | |
tree | 5a85ea83bfba94610d95b7c92196ee879e6dc6b6 /sys/arch/powerpc | |
parent | 1a7fe0231942d0e57909a2e6458fbcd0d2a5a8e0 (diff) |
Convert netisr to a normal soft interrupt instead of hanving MD code
for it. This makes the netisr a real C function which will help further
development. No noticable performance change on i386 and amd64.
With input from kettenis@ and miod@ additional OKs mikeb@ and henning@
Diffstat (limited to 'sys/arch/powerpc')
-rw-r--r-- | sys/arch/powerpc/include/intr.h | 7 | ||||
-rw-r--r-- | sys/arch/powerpc/powerpc/softintr.c | 30 |
2 files changed, 2 insertions, 35 deletions
diff --git a/sys/arch/powerpc/include/intr.h b/sys/arch/powerpc/include/intr.h index 6cbf762efba..955605df495 100644 --- a/sys/arch/powerpc/include/intr.h +++ b/sys/arch/powerpc/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.44 2010/04/23 03:50:22 miod Exp $ */ +/* $OpenBSD: intr.h,v 1.45 2010/12/21 14:56:24 claudio Exp $ */ /* * Copyright (c) 1997 Per Fogelstrom, Opsycon AB and RTMX Inc, USA. @@ -115,11 +115,6 @@ void *softintr_establish(int, void (*)(void *), void *); void softintr_init(void); void softintr_schedule(void *); -/* XXX For legacy software interrupts. */ -extern struct soft_intrhand *softnet_intrhand; - -#define setsoftnet() softintr_schedule(softnet_intrhand) - #define SINT_CLOCK SINTMASK(SI_SOFTCLOCK) #define SINT_NET SINTMASK(SI_SOFTNET) #define SINT_TTY SINTMASK(SI_SOFTTTY) diff --git a/sys/arch/powerpc/powerpc/softintr.c b/sys/arch/powerpc/powerpc/softintr.c index 230ab75681f..3c476466524 100644 --- a/sys/arch/powerpc/powerpc/softintr.c +++ b/sys/arch/powerpc/powerpc/softintr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softintr.c,v 1.2 2009/11/08 21:05:18 kettenis Exp $ */ +/* $OpenBSD: softintr.c,v 1.3 2010/12/21 14:56:24 claudio Exp $ */ /* $NetBSD: softintr.c,v 1.2 2003/07/15 00:24:39 lukem Exp $ */ /* @@ -39,9 +39,6 @@ #include <sys/param.h> #include <sys/malloc.h> -/* XXX Network interrupts should be converted to new softintrs. */ -#include <net/netisr.h> - #include <uvm/uvm_extern.h> #include <machine/atomic.h> @@ -51,8 +48,6 @@ struct soft_intrq soft_intrq[SI_NQUEUES]; struct soft_intrhand *softnet_intrhand; -void netintr(void); - /* * Initialize the software interrupt system. */ @@ -68,10 +63,6 @@ softintr_init(void) siq->siq_si = i; mtx_init(&siq->siq_mtx, IPL_HIGH); } - - /* XXX Establish legacy software interrupt handlers. */ - softnet_intrhand = softintr_establish(IPL_SOFTNET, - (void (*)(void *))netintr, NULL); } /* @@ -184,25 +175,6 @@ softintr_schedule(void *arg) mtx_leave(&siq->siq_mtx); } -int netisr; - -void -netintr(void) -{ - int n; - - while ((n = netisr) != 0) { - atomic_clearbits_int(&netisr, n); -#define DONETISR(bit, fn) \ - do { \ - if (n & (1 << (bit))) \ - fn(); \ - } while (0) -#include <net/netisr_dispatch.h> -#undef DONETISR - } -} - #if 0 void dosoftint(int xcpl) |