diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2000-11-08 13:58:20 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2000-11-08 13:58:20 +0000 |
commit | 1b79a11f795a212f1423dca8a713fa6bc970f9c1 (patch) | |
tree | a409c40c1fae5d850019ffebe2d906bf79d3164c | |
parent | 1f872c4ae09031cae6226d34332c12e410aa0ff2 (diff) |
Use netisr_dispatch.
-rw-r--r-- | sys/arch/sparc/sparc/intr.c | 49 |
1 files changed, 7 insertions, 42 deletions
diff --git a/sys/arch/sparc/sparc/intr.c b/sys/arch/sparc/sparc/intr.c index 5fcaec1ec91..e5e18eea5c9 100644 --- a/sys/arch/sparc/sparc/intr.c +++ b/sys/arch/sparc/sparc/intr.c @@ -77,9 +77,6 @@ #include <netinet6/ip6_var.h> #endif -#include "ppp.h" -#include "bridge.h" - void strayintr __P((struct clockframe *)); int soft01intr __P((void *)); @@ -125,11 +122,6 @@ soft01intr(fp) if (rom_console_input && cnrom()) cnrint(); if (sir.sir_any) { - /* - * XXX this is bogus: should just have a list of - * routines to call, a la timeouts. Mods to - * netisr are not atomic and must be protected (gah). - */ if (sir.sir_which[SIR_NET]) { int n, s; @@ -138,40 +130,13 @@ soft01intr(fp) netisr = 0; splx(s); sir.sir_which[SIR_NET] = 0; -#ifdef INET - if (n & (1 << NETISR_ARP)) - arpintr(); - if (n & (1 << NETISR_IP)) - ipintr(); -#endif -#ifdef INET6 - if (n & (1 << NETISR_IPV6)) - ip6intr(); -#endif -#ifdef NETATALK - if (n & (1 << NETISR_ATALK)) - atintr(); -#endif -#ifdef NS - if (n & (1 << NETISR_NS)) - nsintr(); -#endif -#ifdef ISO - if (n & (1 << NETISR_ISO)) - clnlintr(); -#endif -#ifdef NATM - if (n & (1 << NETISR_NATM)) - natmintr(); -#endif -#if NPPP > 0 - if (n & (1 << NETISR_PPP)) - pppintr(); -#endif -#if NBRIDGE > 0 - if (n & (1 << NETISR_BRIDGE)) - bridgeintr(); -#endif +#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; |