From e98319aec8d52fc63e97ff29b585d402140fbf2c Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Wed, 3 Jan 2001 01:47:31 +0000 Subject: Use netisr_dispatch. --- sys/arch/sun3/sun3/intreg.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'sys/arch/sun3') 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 #include +#include + #include #include #include @@ -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 +#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; -- cgit v1.2.3