summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2001-01-03 01:47:31 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2001-01-03 01:47:31 +0000
commite98319aec8d52fc63e97ff29b585d402140fbf2c (patch)
tree66adbcfebbbe426d8fccd16e2072df857834e895
parent42c4e78a278684735598186a318115baebdd5f66 (diff)
Use netisr_dispatch.
-rw-r--r--sys/arch/sun3/sun3/intreg.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/sys/arch/sun3/sun3/intreg.c b/sys/arch/sun3/sun3/intreg.c
index 740e49e85ab..a300f0fbf44 100644
--- a/sys/arch/sun3/sun3/intreg.c
+++ b/sys/arch/sun3/sun3/intreg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intreg.c,v 1.5 1997/01/16 04:04:23 kstailey Exp $ */
+/* $OpenBSD: intreg.c,v 1.6 2001/01/03 01:47:30 miod Exp $ */
/* $NetBSD: intreg.c,v 1.5 1996/11/20 18:57:32 gwr Exp $ */
/*-
@@ -47,6 +47,8 @@
#include <sys/device.h>
#include <sys/vmmeter.h>
+#include <net/netisr.h>
+
#include <machine/autoconf.h>
#include <machine/cpu.h>
#include <machine/machdep.h>
@@ -135,7 +137,7 @@ soft1intr(arg)
void *arg;
{
union sun3sir sir;
- int s;
+ int n, s;
s = splhigh();
sir.sir_any = sun3sir.sir_any;
@@ -146,8 +148,18 @@ soft1intr(arg)
if (sir.sir_any) {
cnt.v_soft++;
if (sir.sir_which[SIR_NET]) {
+ s = splhigh();
+ n = netisr;
+ netisr = 0;
+ splx(s);
sir.sir_which[SIR_NET] = 0;
- netintr();
+#define DONETISR(bit, fn) \
+ do { \
+ if (n & (1 << bit)) \
+ fn(); \
+ } while (0)
+#include <net/netisr_dispatch.h>
+#undef DONETISR
}
if (sir.sir_which[SIR_CLOCK]) {
sir.sir_which[SIR_CLOCK] = 0;
@@ -163,7 +175,7 @@ soft1intr(arg)
}
return (1);
}
- return(0);
+ return (0);
}
static int isr_soft_pending;