Define the DONETISR macro and use netisr_dispatch.h. This is to cut down on code duplication and to standardize the available NETISRs across all ports.

This commit is contained in:
erh 2000-02-21 20:38:46 +00:00
parent 6ac8255360
commit 8f03b9a04a
22 changed files with 232 additions and 897 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.194 2000/02/12 20:57:12 thorpej Exp $ */
/* $NetBSD: machdep.c,v 1.195 2000/02/21 20:38:46 erh Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@ -79,7 +79,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.194 2000/02/12 20:57:12 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.195 2000/02/21 20:38:46 erh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -1853,33 +1853,7 @@ netintr()
fn; \
} while (0)
#ifdef INET
#if NARP > 0
DONETISR(NETISR_ARP, arpintr());
#endif
DONETISR(NETISR_IP, ipintr());
#endif
#ifdef INET6
DONETISR(NETISR_IPV6, ip6intr());
#endif
#ifdef NETATALK
DONETISR(NETISR_ATALK, atintr());
#endif
#ifdef NS
DONETISR(NETISR_NS, nsintr());
#endif
#ifdef ISO
DONETISR(NETISR_ISO, clnlintr());
#endif
#ifdef CCITT
DONETISR(NETISR_CCITT, ccittintr());
#endif
#ifdef NATM
DONETISR(NETISR_NATM, natmintr());
#endif
#if NPPP > 0
DONETISR(NETISR_PPP, pppintr());
#endif
#include <net/netisr_dispatch.h>
#undef DONETISR
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.146 2000/02/09 05:48:29 shin Exp $ */
/* $NetBSD: machdep.c,v 1.147 2000/02/21 20:38:46 erh Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -1030,48 +1030,17 @@ badbaddr(addr)
static void
netintr()
{
#ifdef INET
#if NARP > 0
if (netisr & (1 << NETISR_ARP)) {
netisr &= ~(1 << NETISR_ARP);
arpintr();
}
#endif
if (netisr & (1 << NETISR_IP)) {
netisr &= ~(1 << NETISR_IP);
ipintr();
}
#endif
#ifdef INET6
if (netisr & (1 << NETISR_IPV6)) {
netisr &= ~(1 << NETISR_IPV6);
ip6intr();
}
#endif
#ifdef NETATALK
if (netisr & (1 << NETISR_ATALK)) {
netisr &= ~(1 << NETISR_ATALK);
atintr();
}
#endif
#ifdef NS
if (netisr & (1 << NETISR_NS)) {
netisr &= ~(1 << NETISR_NS);
nsintr();
}
#endif
#ifdef ISO
if (netisr & (1 << NETISR_ISO)) {
netisr &= ~(1 << NETISR_ISO);
clnlintr();
}
#endif
#if NPPP > 0
if (netisr & (1 << NETISR_PPP)) {
netisr &= ~(1 << NETISR_PPP);
pppintr();
}
#endif
#define DONETISR(bit, fn) do { \
if (netisr & (1 << bit)) { \
netisr &= ~(1 << bit); \
fn(); \
} \
} while (0)
#include <net/netisr_dispatch.h>
#undef DONETISR
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: intr.c,v 1.17 2000/02/09 05:48:30 shin Exp $ */
/* $NetBSD: intr.c,v 1.18 2000/02/21 20:38:47 erh Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@ -203,66 +203,17 @@ dosoftints()
INC_SINTRCNT(SOFTIRQ_NET);
clearsoftintr(SOFTIRQ_BIT(SOFTIRQ_NET));
#ifdef INET
#if NARP > 0
if (netisr & (1 << NETISR_ARP)) {
atomic_clear_bit(&netisr, (1 << NETISR_ARP));
arpintr();
}
#endif
if (netisr & (1 << NETISR_IP)) {
atomic_clear_bit(&netisr, (1 << NETISR_IP));
ipintr();
}
#endif
#ifdef INET6
if (netisr & (1 << NETISR_IPV6)) {
atomic_clear_bit(&netisr, (1 << NETISR_IPV6));
ip6intr();
}
#endif
#ifdef NETATALK
if (netisr & (1 << NETISR_ATALK)) {
atomic_clear_bit(&netisr, (1 << NETISR_ATALK));
atintr();
}
#endif
#ifdef NS
if (netisr & (1 << NETISR_NS)) {
atomic_clear_bit(&netisr, (1 << NETISR_NS));
nsintr();
}
#endif
#ifdef IMP
if (netisr & (1 << NETISR_IMP)) {
atomic_clear_bit(&netisr, (1 << NETISR_IMP));
impintr();
}
#endif
#ifdef ISO
if (netisr & (1 << NETISR_ISO)) {
atomic_clear_bit(&netisr, (1 << NETISR_ISO));
clnlintr();
}
#endif
#ifdef CCITT
if (netisr & (1 << NETISR_CCITT)) {
atomic_clear_bit(&netisr, (1 << NETISR_CCITT));
ccittintr();
}
#endif
#ifdef NATM
if (netisr & (1 << NETISR_NATM)) {
atomic_clear_bit(&netisr, (1 << NETISR_NATM));
natmintr();
}
#endif
#if NPPP > 0
if (netisr & (1 << NETISR_PPP)) {
atomic_clear_bit(&netisr, (1 << NETISR_PPP));
pppintr();
}
#endif
#define DONETISR(bit, fn) do { \
if (netisr & (1 << bit)) { \
atomic_clear_bit(&netisr, (1 << bit)); \
fn(); \
} \
} while (0)
#include <net/netisr_dispatch.h>
#undef DONETISR
(void)splx(s);
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.91 2000/01/19 20:05:33 thorpej Exp $ */
/* $NetBSD: machdep.c,v 1.92 2000/02/21 20:38:47 erh Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -811,60 +811,16 @@ void natmintr __P((void));
static void
netintr()
{
#ifdef INET
#if NARP > 0
if (netisr & (1 << NETISR_ARP)) {
netisr &= ~(1 << NETISR_ARP);
arpintr();
}
#endif
if (netisr & (1 << NETISR_IP)) {
netisr &= ~(1 << NETISR_IP);
ipintr();
}
#endif
#ifdef INET6
if (netisr & (1 << NETISR_IPV6)) {
netisr &= ~(1 << NETISR_IPV6);
ip6intr();
}
#endif
#ifdef NETATALK
if (netisr & (1 << NETISR_ATALK)) {
netisr &= ~(1 << NETISR_ATALK);
atintr();
}
#endif
#ifdef NS
if (netisr & (1 << NETISR_NS)) {
netisr &= ~(1 << NETISR_NS);
nsintr();
}
#endif
#ifdef ISO
if (netisr & (1 << NETISR_ISO)) {
netisr &= ~(1 << NETISR_ISO);
clnlintr();
}
#endif
#ifdef CCITT
if (netisr & (1 << NETISR_CCITT)) {
netisr &= ~(1 << NETISR_CCITT);
ccittintr();
}
#endif
#ifdef NATM
if (netisr & (1 << NETISR_NATM)) {
netisr &= ~(1 << NETISR_NATM);
natmintr();
}
#endif
#ifdef NPPP
if (netisr & (1 << NETISR_PPP)) {
netisr &= ~(1 << NETISR_PPP);
pppintr();
}
#endif
#define DONETISR(bit, fn) do { \
if (netisr & (1 << bit)) { \
netisr &= ~(1 << bit); \
fn(); \
} \
} while (0)
#include <net/netisr_dispatch.h>
#undef DONETISR
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.48 2000/01/19 20:05:33 thorpej Exp $ */
/* $NetBSD: machdep.c,v 1.49 2000/02/21 20:38:47 erh Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -800,40 +800,14 @@ void
softnet(isr)
int isr;
{
#ifdef INET
#include "arp.h"
#if NARP > 0
if (isr & (1 << NETISR_ARP))
arpintr();
#endif
if (isr & (1 << NETISR_IP))
ipintr();
#endif
#ifdef INET6
if (isr & (1 << NETISR_IPV6))
ip6intr();
#endif
#ifdef IMP
if (isr & (1 << NETISR_IMP))
impintr();
#endif
#ifdef NS
if (isr & (1 << NETISR_NS))
nsintr();
#endif
#ifdef ISO
if (isr & (1 << NETISR_ISO))
clnlintr();
#endif
#ifdef CCITT
if (isr & (1 << NETISR_CCITT))
ccittintr();
#endif
#include "ppp.h"
#if NPPP > 0
if (isr & (1 << NETISR_PPP))
pppintr();
#endif
#define DONETISR(bit, fn) do { \
if (isr & (1 << bit)) \
fn(); \
} while (0)
#include <net/netisr_dispatch.h>
#undef DONETISR
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: shb.c,v 1.5 1999/12/27 10:50:41 msaitoh Exp $ */
/* $NetBSD: shb.c,v 1.6 2000/02/21 20:38:47 erh Exp $ */
/*-
* Copyright (c) 1993, 1994 Charles Hannum. All rights reserved.
@ -681,39 +681,14 @@ Xsoftnet(void)
unsigned long ni = netisr;
netisr = 0;
#include "arp.h"
#if NARP > 0
if (ni & (1 << NETISR_ARP))
arpintr();
#endif
if (ni & (1 << NETISR_IP))
ipintr();
#endif /* INET */
#ifdef NS
if (ni & (1 << NETISR_NS))
nsintr();
#endif
#ifdef ISO
if (ni & (1 << NETISR_ISO))
clnlintr();
#endif
#ifdef CCITT
if (ni & (1 << NETISR_CCITT))
ccittintr();
#endif
#ifdef NATM
if (ni & (1 << NETISR_NATM))
natmintr();
#endif
#ifdef NETATALK
if (ni & (1 << NETISR_ATALK))
atintr();
#endif
#include "ppp.h"
#if NPPP > 0
if (ni & (1 << NETISR_PPP))
pppintr();
#endif
#define DONETISR(bit, fn) do { \
if (ni & (1 << bit)) \
fn(); \
} while (0)
#include <net/netisr_dispatch.h>
#undef DONETISR
}
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: intr.c,v 1.14 1999/08/01 21:50:17 thorpej Exp $ */
/* $NetBSD: intr.c,v 1.15 2000/02/21 20:38:48 erh Exp $ */
/*-
* Copyright (c) 1996, 1997, 1999 The NetBSD Foundation, Inc.
@ -324,39 +324,14 @@ netintr()
if (isr == 0)
return;
#ifdef INET
#include "arp.h"
#if NARP > 0
if (isr & (1 << NETISR_ARP))
arpintr();
#endif
if (isr & (1 << NETISR_IP))
ipintr();
#endif
#ifdef INET6
if (isr & (1 << NETISR_IPV6))
ip6intr();
#endif
#ifdef NETATALK
if (isr & (1 << NETISR_ATALK))
atintr();
#endif
#ifdef NS
if (isr & (1 << NETISR_NS))
nsintr();
#endif
#ifdef ISO
if (isr & (1 << NETISR_ISO))
clnlintr();
#endif
#ifdef CCITT
if (isr & (1 << NETISR_CCITT))
ccittintr();
#endif
#include "ppp.h"
#if NPPP > 0
if (isr & (1 << NETISR_PPP))
pppintr();
#endif
#define DONETISR(bit, fn) do { \
if (isr & (1 << bit)) \
fn(); \
} while(0)
#include <net/netisr_dispatch.h>
#undef DONETISR
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: icu.s,v 1.61 1999/07/01 22:03:38 thorpej Exp $ */
/* $NetBSD: icu.s,v 1.62 2000/02/21 20:38:48 erh Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -150,50 +150,23 @@ IDTVEC(softserial)
movl %ebx,_C_LABEL(cpl)
jmp %esi
#define DONET(s, c) \
.globl c ;\
testl $(1 << s),%edi ;\
jz 1f ;\
call c ;\
1:
IDTVEC(softnet)
movl _C_LABEL(imask) + IPL_SOFTNET * 4,%eax
movl %eax,_C_LABEL(cpl)
xorl %edi,%edi
xchgl _C_LABEL(netisr),%edi
#ifdef INET
#include "arp.h"
#if NARP > 0
DONET(NETISR_ARP, _C_LABEL(arpintr))
#endif
DONET(NETISR_IP, _C_LABEL(ipintr))
#endif
#ifdef INET6
DONET(NETISR_IPV6, _C_LABEL(ip6intr))
#endif
#ifdef IMP
DONET(NETISR_IMP, _C_LABEL(impintr))
#endif
#ifdef NS
DONET(NETISR_NS, _C_LABEL(nsintr))
#endif
#ifdef ISO
DONET(NETISR_ISO, _C_LABEL(clnlintr))
#endif
#ifdef CCITT
DONET(NETISR_CCITT, _C_LABEL(ccittintr))
#endif
#ifdef NATM
DONET(NETISR_NATM, _C_LABEL(natmintr))
#endif
#ifdef NETATALK
DONET(NETISR_ATALK, _C_LABEL(atintr))
#endif
#include "ppp.h"
#if NPPP > 0
DONET(NETISR_PPP, _C_LABEL(pppintr))
#endif
#define DONETISR(s, c) \
.globl _C_LABEL(c) ;\
testl $(1 << s),%edi ;\
jz 1f ;\
call _C_LABEL(c) ;\
1:
#include "net/netisr_dispatch.h"
#undef DONETISR
movl %ebx,_C_LABEL(cpl)
jmp %esi

View File

@ -1,5 +1,5 @@
/* $NetBSD: isr.c,v 1.1 2000/01/05 08:49:03 nisimura Exp $ */
/* $NetBSD: isr.c,v 1.1 2000/01/05 08:49:03 nisimura Exp $ */
/* $NetBSD: isr.c,v 1.2 2000/02/21 20:38:48 erh Exp $ */
/* $NetBSD: isr.c,v 1.2 2000/02/21 20:38:48 erh Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -39,7 +39,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.1 2000/01/05 08:49:03 nisimura Exp $");
__KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.2 2000/02/21 20:38:48 erh Exp $");
/*
* Link and dispatch interrupts.
@ -303,54 +303,15 @@ void pppintr __P((void));
void
netintr()
{
#ifdef INET
#include "arp.h"
#if NARP > 0
if (netisr & (1 << NETISR_ARP)) {
netisr &= ~(1 << NETISR_ARP);
arpintr();
}
#endif
if (netisr & (1 << NETISR_IP)) {
netisr &= ~(1 << NETISR_IP);
ipintr();
}
#endif
#ifdef INET6
if (netisr & (1 << NETISR_IPV6)) {
netisr &= ~(1 << NETISR_IPV6);
ip6intr();
}
#endif
#ifdef NETATALK
if (netisr & (1 << NETISR_ATALK)) {
netisr &= ~(1 << NETISR_ATALK);
atintr();
}
#endif
#ifdef NS
if (netisr & (1 << NETISR_NS)) {
netisr &= ~(1 << NETISR_NS);
nsintr();
}
#endif
#ifdef ISO
if (netisr & (1 << NETISR_ISO)) {
netisr &= ~(1 << NETISR_ISO);
clnlintr();
}
#endif
#ifdef CCITT
if (netisr & (1 << NETISR_CCITT)) {
netisr &= ~(1 << NETISR_CCITT);
ccittintr();
}
#endif
#include "ppp.h"
#if NPPP > 0
if (netisr & (1 << NETISR_PPP)) {
netisr &= ~(1 << NETISR_PPP);
pppintr();
}
#endif
#define DONETISR(bit, fn) do { \
if (netisr & (1 << bit)) { \
netisr &= ~(1 << bit); \
fn(); \
} \
} while (0)
#include <net/netisr_dispatch.h>
#undef DONETISR
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: intr.c,v 1.12 2000/02/21 05:50:14 scottr Exp $ */
/* $NetBSD: intr.c,v 1.13 2000/02/21 20:38:48 erh Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@ -314,39 +314,14 @@ netintr()
if (isr == 0)
return;
#ifdef INET
#include "arp.h"
#if NARP > 0
if (isr & (1 << NETISR_ARP))
arpintr();
#endif
if (isr & (1 << NETISR_IP))
ipintr();
#endif
#ifdef INET6
if (isr & (1 << NETISR_IPV6))
ip6intr();
#endif
#ifdef NETATALK
if (isr & (1 << NETISR_ATALK))
atintr();
#endif
#ifdef NS
if (isr & (1 << NETISR_NS))
nsintr();
#endif
#ifdef ISO
if (isr & (1 << NETISR_ISO))
clnlintr();
#endif
#ifdef CCITT
if (isr & (1 << NETISR_CCITT))
ccittintr();
#endif
#include "ppp.h"
#if NPPP > 0
if (isr & (1 << NETISR_PPP))
pppintr();
#endif
#define DONETISR(bit, fn) do { \
if (isr & (1 << bit)) \
fn(); \
} while (0)
#include <net/netisr_dispatch.h>
#undef DONETISR
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.68 2000/02/09 05:48:31 shin Exp $ */
/* $NetBSD: machdep.c,v 1.69 2000/02/21 20:38:49 erh Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -687,48 +687,15 @@ softnet()
isr = netisr;
netisr = 0;
#ifdef INET
#include "arp.h"
#if NARP > 0
if (isr & (1 << NETISR_ARP))
arpintr();
#endif
if (isr & (1 << NETISR_IP))
ipintr();
#endif
#ifdef INET6
if (isr & (1 << NETISR_IPV6))
ip6intr();
#endif
#ifdef IMP
if (isr & (1 << NETISR_IMP))
impintr();
#endif
#ifdef NS
if (isr & (1 << NETISR_NS))
nsintr();
#endif
#ifdef ISO
if (isr & (1 << NETISR_ISO))
clnlintr();
#endif
#ifdef CCITT
if (isr & (1 << NETISR_CCITT))
ccittintr();
#endif
#ifdef NATM
if (isr & (1 << NETISR_NATM))
natmintr();
#endif
#ifdef NETATALK
if (isr & (1 << NETISR_ATALK))
atintr();
#endif
#include "ppp.h"
#if NPPP > 0
if (isr & (1 << NETISR_PPP))
pppintr();
#endif
#define DONETISR(bit, fn) do { \
if (isr & (1 << bit)) \
fn(); \
} while (0)
#include <net/netisr_dispatch.h>
#undef DONETISR
}
#include "zsc.h"

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.120 2000/02/09 05:48:31 shin Exp $ */
/* $NetBSD: trap.c,v 1.121 2000/02/21 20:38:49 erh Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.120 2000/02/09 05:48:31 shin Exp $");
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.121 2000/02/21 20:38:49 erh Exp $");
#include "opt_cputype.h" /* which mips CPU levels do we support? */
#include "opt_inet.h"
@ -795,30 +795,14 @@ interrupt(status, cause, pc)
uvmexp.softs++;
if (isr) {
intrcnt[SOFTNET_INTR]++;
#ifdef INET
#if NARP > 0
if (isr & (1 << NETISR_ARP)) arpintr();
#endif
if (isr & (1 << NETISR_IP)) ipintr();
#endif
#ifdef INET6
if (isr & (1 << NETISR_IPV6)) ip6intr();
#endif
#ifdef NETATALK
if (isr & (1 << NETISR_ATALK)) atintr();
#endif
#ifdef NS
if (isr & (1 << NETISR_NS)) nsintr();
#endif
#ifdef ISO
if (isr & (1 << NETISR_ISO)) clnlintr();
#endif
#ifdef CCITT
if (isr & (1 << NETISR_CCITT)) ccittintr();
#endif
#if NPPP > 0
if (isr & (1 << NETISR_PPP)) pppintr();
#endif
#define DONETISR(bit, fn) do { \
if (isr & (1 << bit)) \
fn(); \
} while (0)
#include <net/netisr_dispatch.h>
#undef DONETISR
}
if (sisr && mips_software_intr)
(*mips_software_intr)(sisr);

View File

@ -1,4 +1,4 @@
/* $NetBSD: shb.c,v 1.2 1999/09/17 20:04:41 thorpej Exp $ */
/* $NetBSD: shb.c,v 1.3 2000/02/21 20:38:49 erh Exp $ */
/*-
* Copyright (c) 1993, 1994 Charles Hannum. All rights reserved.
@ -564,43 +564,17 @@ void nsintr __P((void));
void
Xsoftnet(void)
{
#ifdef INET
unsigned long ni = netisr;
netisr = 0;
#include "arp.h"
#if NARP > 0
if (ni & (1 << NETISR_ARP))
arpintr();
#endif
if (ni & (1 << NETISR_IP))
ipintr();
#endif /* INET */
#ifdef NS
if (ni & (1 << NETISR_NS))
nsintr();
#endif
#ifdef ISO
if (ni & (1 << NETISR_ISO))
clnlintr();
#endif
#ifdef CCITT
if (ni & (1 << NETISR_CCITT))
ccittintr();
#endif
#ifdef NATM
if (ni & (1 << NETISR_NATM))
natmintr();
#endif
#ifdef NETATALK
if (ni & (1 << NETISR_ATALK))
atintr();
#endif
#include "ppp.h"
#if NPPP > 0
if (ni & (1 << NETISR_PPP))
pppintr();
#endif
#define DONETISR(bit, fn) do { \
if (ni & (1 << bit)) \
fn(); \
} while (0)
#include <net/netisr_dispatch.h>
#undef DONETISR
}
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: isr.c,v 1.14 1999/06/28 08:20:46 itojun Exp $ */
/* $NetBSD: isr.c,v 1.15 2000/02/21 20:38:49 erh Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -282,60 +282,19 @@ isrdispatch_vectored(pc, evec, frame)
printf("isrdispatch_vectored: vec 0x%x not claimed\n", vec);
}
/*
* XXX Why on earth isn't this in a common file?!
*/
void
netintr()
{
#ifdef INET
#include "arp.h"
#if NARP > 0
if (netisr & (1 << NETISR_ARP)) {
netisr &= ~(1 << NETISR_ARP);
arpintr();
}
#endif
if (netisr & (1 << NETISR_IP)) {
netisr &= ~(1 << NETISR_IP);
ipintr();
}
#endif
#ifdef INET6
if (netisr & (1 << NETISR_IPV6)) {
netisr &= ~(1 << NETISR_IPV6);
ip6intr();
}
#endif
#ifdef NETATALK
if (netisr & (1 << NETISR_ATALK)) {
netisr &= ~(1 << NETISR_ATALK);
atintr();
}
#endif
#ifdef NS
if (netisr & (1 << NETISR_NS)) {
netisr &= ~(1 << NETISR_NS);
nsintr();
}
#endif
#ifdef ISO
if (netisr & (1 << NETISR_ISO)) {
netisr &= ~(1 << NETISR_ISO);
clnlintr();
}
#endif
#ifdef CCITT
if (netisr & (1 << NETISR_CCITT)) {
netisr &= ~(1 << NETISR_CCITT);
ccittintr();
}
#endif
#include "ppp.h"
#if NPPP > 0
if (netisr & (1 << NETISR_PPP)) {
netisr &= ~(1 << NETISR_PPP);
pppintr();
}
#endif
#define DONETISR(bit, fn) do { \
if (netisr & (1 << bit)) { \
netisr &= ~(1 << bit); \
fn(); \
} \
} while (0)
#include <net/netisr_dispatch.h>
#undef DONETISR
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: isr.c,v 1.1 1999/12/09 14:53:17 tsutsui Exp $ */
/* $NetBSD: isr.c,v 1.2 2000/02/21 20:38:50 erh Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -334,54 +334,16 @@ void pppintr __P((void));
void
netintr()
{
#ifdef INET
#include "arp.h"
#if NARP > 0
if (netisr & (1 << NETISR_ARP)) {
netisr &= ~(1 << NETISR_ARP);
arpintr();
}
#endif
if (netisr & (1 << NETISR_IP)) {
netisr &= ~(1 << NETISR_IP);
ipintr();
}
#endif
#ifdef INET6
if (netisr & (1 << NETISR_IPV6)) {
netisr &= ~(1 << NETISR_IPV6);
ip6intr();
}
#endif
#ifdef NETATALK
if (netisr & (1 << NETISR_ATALK)) {
netisr &= ~(1 << NETISR_ATALK);
atintr();
}
#endif
#ifdef NS
if (netisr & (1 << NETISR_NS)) {
netisr &= ~(1 << NETISR_NS);
nsintr();
}
#endif
#ifdef ISO
if (netisr & (1 << NETISR_ISO)) {
netisr &= ~(1 << NETISR_ISO);
clnlintr();
}
#endif
#ifdef CCITT
if (netisr & (1 << NETISR_CCITT)) {
netisr &= ~(1 << NETISR_CCITT);
ccittintr();
}
#endif
#include "ppp.h"
#if NPPP > 0
if (netisr & (1 << NETISR_PPP)) {
netisr &= ~(1 << NETISR_PPP);
pppintr();
}
#endif
#define DONETISR(bit, fn) do { \
if (netisr & (1 << bit)) { \
netisr &= ~(1 << bit); \
fn(); \
} \
} while (0)
#include <net/netisr_dispatch.h>
#undef DONETISR
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: isr.c,v 1.10 1999/06/28 08:20:46 itojun Exp $ */
/* $NetBSD: isr.c,v 1.11 2000/02/21 20:38:50 erh Exp $ */
/*
* This file was taken from mvme68k/mvme68k/isr.c
@ -314,54 +314,15 @@ void pppintr __P((void));
void
netintr()
{
#ifdef INET
#include "arp.h"
#if NARP > 0
if (netisr & (1 << NETISR_ARP)) {
netisr &= ~(1 << NETISR_ARP);
arpintr();
}
#endif
if (netisr & (1 << NETISR_IP)) {
netisr &= ~(1 << NETISR_IP);
ipintr();
}
#endif
#ifdef INET6
if (netisr & (1 << NETISR_IPV6)) {
netisr &= ~(1 << NETISR_IPV6);
ip6intr();
}
#endif
#ifdef NETATALK
if (netisr & (1 << NETISR_ATALK)) {
netisr &= ~(1 << NETISR_ATALK);
atintr();
}
#endif
#ifdef NS
if (netisr & (1 << NETISR_NS)) {
netisr &= ~(1 << NETISR_NS);
nsintr();
}
#endif
#ifdef ISO
if (netisr & (1 << NETISR_ISO)) {
netisr &= ~(1 << NETISR_ISO);
clnlintr();
}
#endif
#ifdef CCITT
if (netisr & (1 << NETISR_CCITT)) {
netisr &= ~(1 << NETISR_CCITT);
ccittintr();
}
#endif
#include "ppp.h"
#if NPPP > 0
if (netisr & (1 << NETISR_PPP)) {
netisr &= ~(1 << NETISR_PPP);
pppintr();
}
#endif
#define DONETISR(bit, fn) do { \
if (netisr & (1 << bit)) { \
netisr &= ~(1 << bit); \
fn(); \
} \
} while (0)
#include <net/netisr_dispatch.h>
#undef DONETISR
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.51 2000/01/19 20:05:45 thorpej Exp $ */
/* $NetBSD: machdep.c,v 1.52 2000/02/21 20:38:50 erh Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -609,40 +609,15 @@ softnet()
int isr = netisr;
netisr = 0;
#ifdef INET
#include "arp.h"
#if NARP > 0
if (isr & (1 << NETISR_ARP))
arpintr();
#endif
if (isr & (1 << NETISR_IP))
ipintr();
#endif
#ifdef INET6
if (isr & (1 << NETISR_IPV6))
ip6intr();
#endif
#ifdef IMP
if (isr & (1 << NETISR_IMP))
impintr();
#endif
#ifdef NS
if (isr & (1 << NETISR_NS))
nsintr();
#endif
#ifdef ISO
if (isr & (1 << NETISR_ISO))
clnlintr();
#endif
#ifdef CCITT
if (isr & (1 << NETISR_CCITT))
ccittintr();
#endif
#include "ppp.h"
#if NPPP > 0
if (isr & (1 << NETISR_PPP))
pppintr();
#endif
#define DONETISR(bit, fn) do { \
if (isr & (1 << bit)) \
fn(); \
} while (0)
#include <net/netisr_dispatch.h>
#undef DONETISR
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: intr.c,v 1.42 2000/02/09 05:48:33 shin Exp $ */
/* $NetBSD: intr.c,v 1.43 2000/02/21 20:38:50 erh Exp $ */
/*
* Copyright (c) 1992, 1993
@ -165,39 +165,16 @@ soft01intr(fp)
netisr = 0;
splx(s);
sir.sir_which[SIR_NET] = 0;
#ifdef INET
#include "arp.h"
#if NARP > 0
if (n & (1 << NETISR_ARP))
arpintr();
#endif
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
#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;

View File

@ -1,4 +1,4 @@
/* $NetBSD: intr.c,v 1.19 2000/02/09 05:48:34 shin Exp $ */
/* $NetBSD: intr.c,v 1.20 2000/02/21 20:38:51 erh Exp $ */
/*
* Copyright (c) 1992, 1993
@ -179,42 +179,16 @@ soft01intr(fp)
netisr = 0;
splx(s);
sir.sir_which[SIR_NET] = 0;
#ifdef INET
#if NARP > 0
if (n & (1 << NETISR_ARP))
arpintr();
#endif
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
#ifdef CCITT
if (n & (1 << NETISR_CCITT))
ccittintr();
#endif
#if NPPP > 0
if (n & (1 << NETISR_PPP))
pppintr();
#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;

View File

@ -1,4 +1,4 @@
/* $NetBSD: isr.c,v 1.41 1999/06/28 08:20:48 itojun Exp $ */
/* $NetBSD: isr.c,v 1.42 2000/02/21 20:38:51 erh Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -132,40 +132,14 @@ void netintr()
netisr = 0;
splx(s);
#if NARP > 0
if (n & (1 << NETISR_ARP))
arpintr();
#endif
#ifdef INET
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 CCITT
if (n & (1 << NETISR_CCITT)) {
ccittintr();
}
#endif
#if NPPP > 0
if (n & (1 << NETISR_PPP)) {
pppintr();
}
#endif
#define DONETISR(bit, fn) do { \
if (n & (1 << bit)) \
fn(); \
} while (0)
#include <net/netisr_dispatch.h>
#undef DONETISR
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: intvec.s,v 1.40 2000/01/17 04:55:26 matt Exp $ */
/* $NetBSD: intvec.s,v 1.41 2000/02/21 20:38:51 erh Exp $ */
/*
* Copyright (c) 1994, 1997 Ludd, University of Lule}, Sweden.
@ -284,30 +284,14 @@ ENTRY(sbiflt);
ENTRY(netint)
PUSHR
#ifdef INET
#if NARP > 0
bbcc $NETISR_ARP,_netisr,1f; calls $0,_arpintr; 1:
#endif
bbcc $NETISR_IP,_netisr,1f; calls $0,_ipintr; 1:
#endif
#ifdef INET6
bbcc $NETISR_IPV6,_netisr,1f; calls $0,_ip6intr; 1:
#endif
#ifdef NETATALK
bbcc $NETISR_ATALK,_netisr,1f; calls $0,_atintr; 1:
#endif
#ifdef NS
bbcc $NETISR_NS,_netisr,1f; calls $0,_nsintr; 1:
#endif
#ifdef ISO
bbcc $NETISR_ISO,_netisr,1f; calls $0,_clnlintr; 1:
#endif
#ifdef CCITT
bbcc $NETISR_CCITT,_netisr,1f; calls $0,_ccittintr; 1:
#endif
#if NPPP > 0
bbcc $NETISR_PPP,_netisr,1f; calls $0,_pppintr; 1:
#endif
#define DONETISR(bit, fn) \
bbcc $bit,_netisr,1f; calls $0,__CONCAT(_,fn); 1:
#include <net/netisr_dispatch.h>
#undef DONETISR
POPR
rei

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.76 2000/01/19 20:05:50 thorpej Exp $ */
/* $NetBSD: machdep.c,v 1.77 2000/02/21 20:38:51 erh Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -969,56 +969,17 @@ void pppintr __P((void));
void
netintr()
{
#ifdef INET
#include "arp.h"
#if NARP > 0
if (netisr & (1 << NETISR_ARP)) {
netisr &= ~(1 << NETISR_ARP);
arpintr();
}
#endif
if (netisr & (1 << NETISR_IP)) {
netisr &= ~(1 << NETISR_IP);
ipintr();
}
#endif
#ifdef INET6
if (netisr & (1 << NETISR_IPV6)) {
netisr &= ~(1 << NETISR_IPV6);
ip6intr();
}
#endif
#ifdef NETATALK
if (netisr & (1 << NETISR_ATALK)) {
netisr &= ~(1 << NETISR_ATALK);
atintr();
}
#endif
#ifdef NS
if (netisr & (1 << NETISR_NS)) {
netisr &= ~(1 << NETISR_NS);
nsintr();
}
#endif
#ifdef ISO
if (netisr & (1 << NETISR_ISO)) {
netisr &= ~(1 << NETISR_ISO);
clnlintr();
}
#endif
#ifdef CCITT
if (netisr & (1 << NETISR_CCITT)) {
netisr &= ~(1 << NETISR_CCITT);
ccittintr();
}
#endif
#include "ppp.h"
#if NPPP > 0
if (netisr & (1 << NETISR_PPP)) {
netisr &= ~(1 << NETISR_PPP);
pppintr();
}
#endif
#define DONETISR(bit, fn) do { \
if (netisr & (1 << bit)) { \
netisr &= ~(1 << bit); \
fn(); \
} \
} while (0)
#include <net/netisr_dispatch.h>
#undef DONETISR
}
void