Kwality control:

* put #includes of opt headers and headers to get protos used by
  net/netisr_dispatch.h in net/netisr.h (if !defined(_LOCORE)) (rather than
  in netisr_dispatch.h itself, and potentially nowhere, respectively).
* require netisr.h to be included before netisr_dispatch.h.
* minor additional cleanup of both netisr.h and netisr_dispatch.h.
* clean up uses to remove now-unnecessary header file inclusions, and
  local prototypes of the fns.
* convert netisr dispatch implementations which didn't use
  netisr_dispatch.h (pc532) to use it.
This commit is contained in:
cgd 2000-07-02 04:40:33 +00:00
parent ea7e9f5176
commit a5c13f9ad4
30 changed files with 129 additions and 785 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: interrupt.c,v 1.49 2000/06/29 09:02:54 mrg Exp $ */
/* $NetBSD: interrupt.c,v 1.50 2000/07/02 04:40:33 cgd Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -70,16 +70,9 @@
#include "opt_multiprocessor.h"
#include "opt_inet.h"
#include "opt_atalk.h"
#include "opt_ccitt.h"
#include "opt_iso.h"
#include "opt_ns.h"
#include "opt_natm.h"
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.49 2000/06/29 09:02:54 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.50 2000/07/02 04:40:33 cgd Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -91,49 +84,7 @@ __KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.49 2000/06/29 09:02:54 mrg Exp $");
#include <machine/cpuvar.h>
/* XXX Network interrupts should be converted to new softintrs */
#include <sys/socket.h>
#include <net/netisr.h>
#include <net/if.h>
#ifdef INET
#include <net/route.h>
#include <netinet/in.h>
#include <netinet/ip_var.h>
#include "arp.h"
#if NARP > 0
#include <netinet/if_inarp.h>
#endif
#endif
#ifdef INET6
# ifndef INET
# include <netinet/in.h>
# endif
#include <netinet/ip6.h>
#include <netinet6/ip6_var.h>
#endif
#ifdef NS
#include <netns/ns_var.h>
#endif
#ifdef ISO
#include <netiso/iso.h>
#include <netiso/clnp.h>
#endif
#ifdef CCITT
#include <netccitt/x25.h>
#include <netccitt/pk.h>
#include <netccitt/pk_extern.h>
#endif
#ifdef NATM
#include <netnatm/natm.h>
#endif
#ifdef NETATALK
#include <netatalk/at_extern.h>
#endif
#include "ppp.h"
#if NPPP > 0
#include <net/ppp_defs.h>
#include <net/if_ppp.h>
#endif
#include <uvm/uvm_extern.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.154 2000/06/29 08:44:03 mrg Exp $ */
/* $NetBSD: machdep.c,v 1.155 2000/07/02 04:40:34 cgd Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -43,11 +43,6 @@
*/
#include "opt_ddb.h"
#include "opt_inet.h"
#include "opt_atalk.h"
#include "opt_ccitt.h"
#include "opt_iso.h"
#include "opt_ns.h"
#include "opt_compat_netbsd.h"
#include <sys/param.h>
@ -74,7 +69,9 @@
#include <sys/syscallargs.h>
#include <sys/core.h>
#include <sys/kcore.h>
#include <net/netisr.h>
#undef PS /* XXX netccitt/pk.h conflict with machine/reg.h? */
#define MAXMEM 64*1024 /* XXX - from cmap.h */
#include <uvm/uvm_extern.h>
@ -103,47 +100,6 @@
#include "fd.h"
#include "ser.h"
#include "arp.h"
#include "ppp.h"
#include <net/netisr.h>
#include <net/if.h>
#ifdef INET
#include <netinet/in.h>
#if NARP > 0
#include <netinet/if_inarp.h>
#endif
#include <netinet/ip_var.h>
#endif
#ifdef INET6
# ifndef INET
# include <netinet/in.h>
# endif
#include <netinet/ip6.h>
#include <netinet6/ip6_var.h>
#endif
#ifdef CCITT
#undef PS /* XXX namespace collision */
#include <netccitt/x25.h>
#include <netccitt/pk.h>
#include <netccitt/pk_extern.h>
#undef PS /* XXX namespace collision */
#endif
#ifdef NS
#include <netns/ns_var.h>
#endif
#ifdef ISO
#include <netiso/iso.h>
#include <netiso/clnp.h>
#endif
#ifdef NETATALK
#include <netatalk/at_extern.h>
#endif
#if NPPP > 0
#include <net/ppp_defs.h>
#include <net/if_ppp.h>
#endif
/* prototypes */
void identifycpu __P((void));

View File

@ -1,4 +1,4 @@
/* $NetBSD: softintr.c,v 1.4 2000/07/01 21:52:05 bjh21 Exp $ */
/* $NetBSD: softintr.c,v 1.5 2000/07/02 04:40:35 cgd Exp $ */
/*
* Copyright (c) 1999 Ben Harris.
@ -38,7 +38,7 @@
#include <sys/param.h>
__RCSID("$NetBSD: softintr.c,v 1.4 2000/07/01 21:52:05 bjh21 Exp $");
__RCSID("$NetBSD: softintr.c,v 1.5 2000/07/02 04:40:35 cgd Exp $");
#include <sys/malloc.h>
#include <sys/queue.h>
@ -160,30 +160,6 @@ dosoftclock(void *arg)
softclock();
}
/*
* XXX The following includes are to avoid implicit function declarations in
* netisr_dispatch.h.
*/
#include <sys/mbuf.h> /* needed by in.h */
#include <sys/socket.h> /* needed by if.h */
#include <net/if.h> /* needed by if_inarp.h */
#include <netinet/in.h> /* needed by if_inarp.h */
#include <netinet/if_inarp.h> /* for arpintr */
#include <netinet/ip_var.h> /* for ipintr */
#include <netinet/ip6.h> /* needed by ip6_var.h> */
#include <netinet6/ip6_var.h> /* for ip6intr */
#include <netatalk/at_extern.h> /* for atintr */
#include <netns/ns_var.h> /* for nsintr */
#include <netiso/iso.h> /* needed by clnp.h */
#include <netiso/clnp.h> /* for clnlintr */
#include <netccitt/x25.h> /* needed by pk_extern.h */
#include <netccitt/pk.h> /* needed by pk_extern.h */
#include <netccitt/pk_extern.h> /* for ccittintr */
#include <netnatm/natm.h> /* for natmintr */
#include <net/ppp_defs.h> /* needed by if_ppp.h */
#include <net/if_ppp.h> /* for pppintr */
static void
dosoftnet(void *arg)
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: intr.c,v 1.19 2000/06/29 08:52:58 mrg Exp $ */
/* $NetBSD: intr.c,v 1.20 2000/07/02 04:40:35 cgd Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@ -35,19 +35,12 @@
* Soft interrupt and other generic interrupt functions.
*/
#include "opt_inet.h"
#include "opt_atalk.h"
#include "opt_ccitt.h"
#include "opt_iso.h"
#include "opt_ns.h"
#include "opt_natm.h"
#include "opt_irqstats.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/syslog.h>
#include <sys/malloc.h>
#include <sys/socket.h>
#include <uvm/uvm_extern.h>
@ -55,46 +48,6 @@
#include <machine/cpu.h>
#include <net/netisr.h>
#include <net/if.h>
#ifdef INET
#include <netinet/in.h>
#include "arp.h"
#if NARP > 0
#include <netinet/if_inarp.h>
#endif /* NARP > 0 */
#include <netinet/ip_var.h>
#endif /* INET */
#ifdef INET6
# ifndef INET
# include <netinet/in.h>
# endif
#include <netinet/ip6.h>
#include <netinet6/ip6_var.h>
#endif /* INET6 */
#ifdef NS
#include <netns/ns_var.h>
#endif /* NS */
#ifdef ISO
#include <netiso/iso.h>
#include <netiso/clnp.h>
#endif /* ISO */
#ifdef CCITT
#include <netccitt/x25.h>
#include <netccitt/pk.h>
#include <netccitt/pk_extern.h>
#endif /* CCITT */
#ifdef NATM
#include <netnatm/natm.h>
#endif /* NATM */
#ifdef NETATALK
#include <netatalk/at_extern.h>
#endif /* NETATALK */
#include "ppp.h"
#if NPPP > 0
#include <net/ppp_defs.h>
#include <net/if_ppp.h>
#endif /* NPPP > 0 */
u_int soft_interrupts = 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.97 2000/06/29 08:28:23 mrg Exp $ */
/* $NetBSD: machdep.c,v 1.98 2000/07/02 04:40:35 cgd Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -43,10 +43,6 @@
*/
#include "opt_ddb.h"
#include "opt_atalk.h"
#include "opt_inet.h"
#include "opt_iso.h"
#include "opt_ns.h"
#include "opt_compat_netbsd.h"
#include <sys/param.h>
@ -776,38 +772,6 @@ badbaddr(addr, size)
/*
* Network interrupt handling
*/
#include "arp.h"
#include "ppp.h"
#ifdef NPPP
void pppintr __P((void));
#endif
#ifdef INET
void ipintr __P((void));
#endif
#ifdef INET6
void ip6intr __P((void));
#endif
#ifdef NETATALK
void atintr __P((void));
#endif
#if NARP > 0
void arpintr __P((void));
#endif
#ifdef NS
void nsintr __P((void));
#endif
#ifdef ISO
void clnlintr __P((void));
#endif
#ifdef CCITT
void ccittintr __P((void));
#endif
#ifdef NATM
void natmintr __P((void));
#endif
static void
netintr()
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.55 2000/06/29 08:22:17 mrg Exp $ */
/* $NetBSD: machdep.c,v 1.56 2000/07/02 04:40:36 cgd Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -33,10 +33,6 @@
#include "opt_compat_netbsd.h"
#include "opt_ddb.h"
#include "opt_inet.h"
#include "opt_ccitt.h"
#include "opt_iso.h"
#include "opt_ns.h"
#include "opt_ipkdb.h"
#include <sys/param.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: shb.c,v 1.9 2000/03/21 04:42:57 itojun Exp $ */
/* $NetBSD: shb.c,v 1.10 2000/07/02 04:40:37 cgd Exp $ */
/*-
* Copyright (c) 1993, 1994 Charles Hannum. All rights reserved.
@ -29,13 +29,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "opt_atalk.h"
#include "opt_ccitt.h"
#include "opt_inet.h"
#include "opt_iso.h"
#include "opt_natm.h"
#include "opt_ns.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
@ -681,20 +674,6 @@ Xsoftserial(void)
}
#endif
#ifdef INET
void arpintr __P((void));
void ipintr __P((void));
void pppintr __P((void));
#endif
#ifdef INET6
void ip6intr __P((void));
#endif
#ifdef NS
void nsintr __P((void));
#endif
void
Xsoftnet(void)
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: intr.c,v 1.16 2000/06/29 08:23:03 mrg Exp $ */
/* $NetBSD: intr.c,v 1.17 2000/07/02 04:40:37 cgd Exp $ */
/*-
* Copyright (c) 1996, 1997, 1999 The NetBSD Foundation, Inc.
@ -40,12 +40,6 @@
* Link and dispatch interrupts.
*/
#include "opt_inet.h"
#include "opt_atalk.h"
#include "opt_ccitt.h"
#include "opt_iso.h"
#include "opt_ns.h"
#define _HP300_INTR_H_PRIVATE
#include <sys/param.h>
@ -296,19 +290,6 @@ intr_dispatch(evec)
printf("intr_dispatch: stray level %d interrupt\n", ipl);
}
/*
* XXX Why on earth isn't this in a common file?!
*/
void netintr __P((void));
void arpintr __P((void));
void atintr __P((void));
void ipintr __P((void));
void ip6intr __P((void));
void nsintr __P((void));
void clnlintr __P((void));
void ccittintr __P((void));
void pppintr __P((void));
void
netintr()
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: icu.s,v 1.62 2000/02/21 20:38:48 erh Exp $ */
/* $NetBSD: icu.s,v 1.63 2000/07/02 04:40:37 cgd Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -36,11 +36,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include "opt_inet.h"
#include "opt_atalk.h"
#include "opt_ccitt.h"
#include "opt_iso.h"
#include "opt_ns.h"
#include "opt_vm86.h"
#include <net/netisr.h>
@ -163,7 +158,7 @@ IDTVEC(softnet)
call _C_LABEL(c) ;\
1:
#include "net/netisr_dispatch.h"
#include <net/netisr_dispatch.h>
#undef DONETISR

View File

@ -1,5 +1,5 @@
/* $NetBSD: isr.c,v 1.3 2000/06/29 08:17:26 mrg Exp $ */
/* $NetBSD: isr.c,v 1.3 2000/06/29 08:17:26 mrg Exp $ */
/* $NetBSD: isr.c,v 1.4 2000/07/02 04:40:38 cgd Exp $ */
/* $NetBSD: isr.c,v 1.4 2000/07/02 04:40:38 cgd Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -39,18 +39,12 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.3 2000/06/29 08:17:26 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.4 2000/07/02 04:40:38 cgd Exp $");
/*
* Link and dispatch interrupts.
*/
#include "opt_inet.h"
#include "opt_atalk.h"
#include "opt_ccitt.h"
#include "opt_iso.h"
#include "opt_ns.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/malloc.h>
@ -285,19 +279,6 @@ 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 __P((void));
void arpintr __P((void));
void atintr __P((void));
void ipintr __P((void));
void ip6intr __P((void));
void nsintr __P((void));
void clnlintr __P((void));
void ccittintr __P((void));
void pppintr __P((void));
void
netintr()
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: intr.c,v 1.14 2000/06/29 08:15:12 mrg Exp $ */
/* $NetBSD: intr.c,v 1.15 2000/07/02 04:40:38 cgd Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@ -40,12 +40,6 @@
* Link and dispatch interrupts.
*/
#include "opt_inet.h"
#include "opt_atalk.h"
#include "opt_ccitt.h"
#include "opt_iso.h"
#include "opt_ns.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/malloc.h>
@ -286,19 +280,6 @@ intr_noint(arg)
return 0;
}
/*
* XXX Why on earth isn't this in a common file?!
*/
void netintr __P((void));
void arpintr __P((void));
void atintr __P((void));
void ipintr __P((void));
void ip6intr __P((void));
void nsintr __P((void));
void clnlintr __P((void));
void ccittintr __P((void));
void pppintr __P((void));
void
netintr()
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.255 2000/07/01 03:35:07 mrg Exp $ */
/* $NetBSD: machdep.c,v 1.256 2000/07/02 04:40:39 cgd Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -120,7 +120,6 @@
#include <machine/psl.h>
#include <machine/pte.h>
#include <machine/kcore.h> /* XXX should be pulled in by sys/kcore.h */
#include <net/netisr.h>
#define MAXMEM 64*1024 /* XXX - from cmap.h */
#include <uvm/uvm_extern.h>
@ -141,7 +140,6 @@
#include <mac68k/dev/macfbvar.h>
#endif
#include <mac68k/dev/zs_cons.h>
#include "arp.h"
/* The following is used externally (sysctl_hw) */
char machine[] = MACHINE; /* from <machine/param.h> */

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.76 2000/06/29 08:10:45 mrg Exp $ */
/* $NetBSD: machdep.c,v 1.77 2000/07/02 04:40:39 cgd Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -33,12 +33,6 @@
#include "opt_compat_netbsd.h"
#include "opt_ddb.h"
#include "opt_inet.h"
#include "opt_atalk.h"
#include "opt_ccitt.h"
#include "opt_iso.h"
#include "opt_ns.h"
#include "opt_natm.h"
#include "adb.h"
#include "opt_ipkdb.h"
@ -62,21 +56,6 @@
#include <net/netisr.h>
#ifdef INET
#include <net/if.h>
#include <netinet/in.h>
#include <netinet/if_inarp.h>
#include <netinet/ip_var.h>
#endif
#ifdef INET6
# ifndef INET
# include <netinet/in.h>
# endif
#include <netinet/ip6.h>
#include <netinet6/ip6_var.h>
#endif
#include <machine/bat.h>
#include <machine/powerpc.h>
#include <machine/trap.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.142 2000/06/29 08:11:27 mrg Exp $ */
/* $NetBSD: trap.c,v 1.143 2000/07/02 04:40:40 cgd Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -44,15 +44,9 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.142 2000/06/29 08:11:27 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.143 2000/07/02 04:40:40 cgd Exp $");
#include "opt_cputype.h" /* which mips CPU levels do we support? */
#include "opt_inet.h"
#include "opt_atalk.h"
#include "opt_ccitt.h"
#include "opt_iso.h"
#include "opt_ns.h"
#include "opt_natm.h"
#include "opt_ktrace.h"
#include "opt_ddb.h"
#include "opt_syscall_debug.h"
@ -64,7 +58,6 @@ __KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.142 2000/06/29 08:11:27 mrg Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/socket.h>
#include <sys/proc.h>
#include <sys/signalvar.h>
#include <sys/syscall.h>
@ -87,47 +80,6 @@ __KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.142 2000/06/29 08:11:27 mrg Exp $");
#include <mips/psl.h>
#include <net/netisr.h>
#include <net/if.h>
#ifdef INET
#include <net/route.h>
#include <netinet/in.h>
#include <netinet/ip_var.h>
#include "arp.h"
#if NARP > 0
#include <netinet/if_inarp.h>
#endif
#endif
#ifdef INET6
# ifndef INET
# include <netinet/in.h>
# endif
#include <netinet/ip6.h>
#include <netinet6/ip6_var.h>
#endif
#ifdef NS
#include <netns/ns_var.h>
#endif
#ifdef ISO
#include <netiso/iso.h>
#include <netiso/clnp.h>
#endif
#ifdef CCITT
#include <netccitt/x25.h>
#include <netccitt/pk.h>
#include <netccitt/pk_extern.h>
#endif
#ifdef NATM
#include <netnatm/natm.h>
#endif
#ifdef NETATALK
#include <netatalk/at_extern.h>
#endif
#include "ppp.h"
#if NPPP > 0
#include <net/ppp_defs.h>
#include <net/if_ppp.h>
#endif
#ifdef DDB
#include <machine/db_machdep.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: shb.c,v 1.6 2000/04/21 13:35:27 tsubai Exp $ */
/* $NetBSD: shb.c,v 1.7 2000/07/02 04:40:41 cgd Exp $ */
/*-
* Copyright (c) 1993, 1994 Charles Hannum. All rights reserved.
@ -29,13 +29,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "opt_atalk.h"
#include "opt_ccitt.h"
#include "opt_inet.h"
#include "opt_iso.h"
#include "opt_natm.h"
#include "opt_ns.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
@ -567,20 +560,6 @@ Xsoftserial(void)
}
#endif
#ifdef INET
void arpintr __P((void));
void ipintr __P((void));
void pppintr __P((void));
#endif
#ifdef INET6
void ip6intr __P((void));
#endif
#ifdef NS
void nsintr __P((void));
#endif
void
Xsoftnet(void)
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: isr.c,v 1.17 2000/06/29 08:04:04 mrg Exp $ */
/* $NetBSD: isr.c,v 1.18 2000/07/02 04:40:41 cgd Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -40,12 +40,6 @@
* Link and dispatch interrupts.
*/
#include "opt_inet.h"
#include "opt_atalk.h"
#include "opt_ccitt.h"
#include "opt_iso.h"
#include "opt_ns.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/malloc.h>
@ -282,30 +276,10 @@ isrdispatch_vectored(pc, evec, frame)
/*
* netisr junk...
* XXX - This really belongs in some common file,
* i.e. src/sys/net/netisr.c
* Also, should use an array of chars instead of
* should use an array of chars instead of
* a bitmask to avoid atomicity locking issues.
*/
#include "arp.h" /* for NARP */
#include "ppp.h"
/*
* Declarations for the netisr functions...
* They are in the header files, but that's not
* really a good reason to drag all those in.
*/
void netintr __P((void));
void arpintr __P((void));
void ipintr __P((void));
void ip6intr __P((void));
void atintr __P((void));
void nsintr __P((void));
void clnlintr __P((void));
void ccittintr __P((void));
void pppintr __P((void));
void
netintr()
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: isr.c,v 1.3 2000/06/29 08:02:52 mrg Exp $ */
/* $NetBSD: isr.c,v 1.4 2000/07/02 04:40:42 cgd Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -45,12 +45,6 @@
* Link and dispatch interrupts.
*/
#include "opt_inet.h"
#include "opt_atalk.h"
#include "opt_ccitt.h"
#include "opt_iso.h"
#include "opt_ns.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/malloc.h>
@ -310,25 +304,6 @@ get_vector_entry(entry)
return ((void *) vectab[entry]);
}
/*
* XXX Why on earth isn't this in a common file?!
*/
/*
* Declarations for the netisr functions...
* They are in the header files, but that's not
* really a good reason to drag all those in.
*/
void netintr __P((void));
void arpintr __P((void));
void ipintr __P((void));
void ip6intr __P((void));
void atintr __P((void));
void nsintr __P((void));
void clnlintr __P((void));
void ccittintr __P((void));
void pppintr __P((void));
void
netintr()
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: isr.c,v 1.12 2000/06/29 07:58:50 mrg Exp $ */
/* $NetBSD: isr.c,v 1.13 2000/07/02 04:40:42 cgd Exp $ */
/*
* This file was taken from mvme68k/mvme68k/isr.c
@ -47,12 +47,6 @@
* Link and dispatch interrupts.
*/
#include "opt_inet.h"
#include "opt_atalk.h"
#include "opt_ccitt.h"
#include "opt_iso.h"
#include "opt_ns.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/malloc.h>
@ -296,19 +290,6 @@ 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 __P((void));
void arpintr __P((void));
void atintr __P((void));
void ipintr __P((void));
void ip6intr __P((void));
void nsintr __P((void));
void clnlintr __P((void));
void ccittintr __P((void));
void pppintr __P((void));
void
netintr()
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.56 2000/06/29 07:52:40 mrg Exp $ */
/* $NetBSD: machdep.c,v 1.57 2000/07/02 04:40:42 cgd Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -33,11 +33,6 @@
#include "opt_compat_netbsd.h"
#include "opt_ddb.h"
#include "opt_inet.h"
#include "opt_ccitt.h"
#include "opt_iso.h"
#include "opt_ns.h"
#include "opt_ipkdb.h"
#include <sys/param.h>
#include <sys/buf.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.113 2000/06/29 07:51:47 mrg Exp $ */
/* $NetBSD: machdep.c,v 1.114 2000/07/02 04:40:43 cgd Exp $ */
/*-
* Copyright (c) 1996 Matthias Pfaller.
@ -43,12 +43,6 @@
*/
#include "opt_ddb.h"
#include "opt_inet.h"
#include "opt_atalk.h"
#include "opt_ccitt.h"
#include "opt_iso.h"
#include "opt_ns.h"
#include "opt_natm.h"
#include "opt_compat_netbsd.h"
#include <sys/param.h>
@ -88,44 +82,6 @@
#include <machine/kcore.h>
#include <net/netisr.h>
#include <net/if.h>
#ifdef INET
#include <netinet/in.h>
#include <netinet/if_inarp.h>
#include <netinet/ip_var.h>
#endif
#ifdef INET6
# ifndef INET
# include <netinet/in.h>
# endif
#include <netinet/ip6.h>
#include <netinet6/ip6_var.h>
#endif
#ifdef NETATALK
#include <netatalk/at_extern.h>
#endif
#ifdef NS
#include <netns/ns_var.h>
#endif
#ifdef ISO
#include <netiso/iso.h>
#include <netiso/clnp.h>
#endif
#ifdef CCITT
#include <netccitt/x25.h>
#include <netccitt/pk.h>
#include <netccitt/pk_extern.h>
#endif
#ifdef NATM
#include <netnatm/natm.h>
#endif
#include "arp.h"
#include "ppp.h"
#if NPPP > 0
#include <net/ppp_defs.h>
#include <net/if_ppp.h>
#endif
#ifdef DDB
#include <machine/db_machdep.h>
@ -1197,31 +1153,13 @@ softnet(arg)
di(); isr = netisr; netisr = 0; ei();
if (isr == 0) return;
#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
#ifdef NATM
if (isr & (1 << NETISR_NATM)) natmintr();
#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
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.8 2000/06/29 07:47:53 mrg Exp $ */
/* $NetBSD: machdep.c,v 1.9 2000/07/02 04:40:44 cgd Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -33,11 +33,6 @@
#include "opt_compat_netbsd.h"
#include "opt_ddb.h"
#include "opt_inet.h"
#include "opt_atalk.h"
#include "opt_ccitt.h"
#include "opt_iso.h"
#include "opt_ns.h"
#include <sys/param.h>
#include <sys/buf.h>
@ -102,49 +97,6 @@
#include <dev/ic/comvar.h>
#endif
#ifdef INET
#include <net/if.h>
#include <netinet/in.h>
#include <netinet/in_var.h>
#include "arp.h"
#if (NARP > 0)
#include <netinet/if_inarp.h>
#endif
#endif
#ifdef INET6
# ifndef INET
# include <netinet/in.h>
# endif
#include <netinet/ip6.h>
#include <netinet6/ip6_var.h>
#endif
#ifdef NS
#include <netns/ns_var.h>
#endif
#ifdef ISO
#include <netiso/iso.h>
#include <netiso/clnp.h>
#endif
#ifdef CCITT
#include <netccitt/x25.h>
#include <netccitt/pk.h>
#include <netccitt/pk_extern.h>
#endif
#ifdef NETATALK
#include <netatalk/at_extern.h>
#endif
#include "ppp.h"
#if (NPPP > 0)
#include <net/ppp_defs.h>
#include <net/if_ppp.h>
#endif
#ifdef DDB
#include <machine/db_machdep.h>
#include <ddb/db_extern.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: intr.c,v 1.46 2000/06/29 07:40:10 mrg Exp $ */
/* $NetBSD: intr.c,v 1.47 2000/07/02 04:40:44 cgd Exp $ */
/*
* Copyright (c) 1992, 1993
@ -43,24 +43,18 @@
*
* @(#)intr.c 8.3 (Berkeley) 11/11/93
*/
#include "opt_inet.h"
#include "opt_atalk.h"
#include "opt_iso.h"
#include "opt_multiprocessor.h"
#include "opt_ns.h"
#include "opt_natm.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/socket.h>
#include <uvm/uvm_extern.h>
#include <dev/cons.h>
#include <net/netisr.h>
#include <net/if.h>
#include <machine/cpu.h>
#include <machine/ctlreg.h>
@ -70,33 +64,6 @@
#include <sparc/sparc/asm.h>
#include <sparc/sparc/cpuvar.h>
#ifdef INET
#include <netinet/in.h>
#include <netinet/if_inarp.h>
#include <netinet/ip_var.h>
#endif
#ifdef INET6
# ifndef INET
# include <netinet/in.h>
# endif
#include <netinet/ip6.h>
#include <netinet6/ip6_var.h>
#endif
#ifdef NS
#include <netns/ns_var.h>
#endif
#ifdef ISO
#include <netiso/iso.h>
#include <netiso/clnp.h>
#endif
#ifdef NETATALK
#include <netatalk/at_extern.h>
#endif
#include "ppp.h"
#if NPPP > 0
#include <net/ppp_defs.h>
#include <net/if_ppp.h>
#endif
#include "com.h"
#if NCOM > 0
extern void comsoft __P((void));

View File

@ -1,4 +1,4 @@
/* $NetBSD: intr.c,v 1.27 2000/06/30 22:58:02 eeh Exp $ */
/* $NetBSD: intr.c,v 1.28 2000/07/02 04:40:45 cgd Exp $ */
/*
* Copyright (c) 1992, 1993
@ -44,59 +44,22 @@
* @(#)intr.c 8.3 (Berkeley) 11/11/93
*/
#include "opt_inet.h"
#include "opt_atalk.h"
#include "opt_iso.h"
#include "opt_ns.h"
#include "opt_ccitt.h"
#include "opt_natm.h"
#include "opt_ddb.h"
#include "ppp.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/socket.h>
#include <sys/malloc.h>
#include <dev/cons.h>
#include <net/netisr.h>
#include <net/if.h>
#include <machine/cpu.h>
#include <machine/ctlreg.h>
#include <machine/instr.h>
#include <machine/trap.h>
#ifdef INET
#include <netinet/in.h>
#include <netinet/if_inarp.h>
#include <netinet/ip_var.h>
#endif
#ifdef INET6
# ifndef INET
# include <netinet/in.h>
# endif
#include <netinet/ip6.h>
#include <netinet6/ip6_var.h>
#endif
#ifdef NS
#include <netns/ns_var.h>
#endif
#ifdef ISO
#include <netiso/iso.h>
#include <netiso/clnp.h>
#endif
#ifdef NETATALK
#include <netatalk/at_extern.h>
#endif
#include "ppp.h"
#if NPPP > 0
#include <net/ppp_defs.h>
#include <net/if_ppp.h>
#endif
/*
* The following array is to used by locore.s to map interrupt packets
* to the proper IPL to send ourselves a softint. It should be filled
@ -154,8 +117,6 @@ strayintr(fp, vectored)
#endif
}
#include "arp.h"
/*
* Level 1 software interrupt (could also be Sbus level 1 interrupt).
* Three possible reasons:

View File

@ -1,4 +1,4 @@
/* $NetBSD: isr.c,v 1.43 2000/06/29 07:19:06 mrg Exp $ */
/* $NetBSD: isr.c,v 1.44 2000/07/02 04:40:45 cgd Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -41,12 +41,6 @@
* and the handy software interrupt request register.
*/
#include "opt_inet.h"
#include "opt_atalk.h"
#include "opt_ccitt.h"
#include "opt_iso.h"
#include "opt_ns.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/device.h>
@ -98,29 +92,10 @@ isr_add_custom(level, handler)
/*
* netisr junk...
* XXX - This really belongs in some common file,
* i.e. src/sys/net/netisr.c
* Also, should use an array of chars instead of
* should use an array of chars instead of
* a bitmask to avoid atomicity locking issues.
*/
#include "arp.h" /* for NARP */
#include "ppp.h"
/*
* Declarations for the netisr functions...
* They are in the header files, but that's not
* really a good reason to drag all those in.
*/
void arpintr __P((void));
void ipintr __P((void));
void ip6intr __P((void));
void atintr __P((void));
void nsintr __P((void));
void clnlintr __P((void));
void ccittintr __P((void));
void pppintr __P((void));
void netintr()
{
int n, s;

View File

@ -1,4 +1,4 @@
# $NetBSD: genassym.cf,v 1.22 2000/06/29 07:14:24 mrg Exp $
# $NetBSD: genassym.cf,v 1.23 2000/07/02 04:40:45 cgd Exp $
#
# Copyright (c) 1997 Ludd, University of Lule}, Sweden.
# All rights reserved.
@ -38,8 +38,6 @@ include <sys/syscall.h>
include <sys/sched.h>
include <sys/device.h>
include <net/netisr.h>
include <uvm/uvm.h>
include <machine/mtpr.h>
@ -114,18 +112,6 @@ define T_SYSCALL T_SYSCALL
define T_ASTFLT T_ASTFLT
define T_KDBTRAP T_KDBTRAP
# software net interrupts
define NETISR_IP NETISR_IP
define NETISR_ISO NETISR_ISO
define NETISR_CCITT NETISR_CCITT
define NETISR_ATALK NETISR_ATALK
define NETISR_IPX NETISR_IPX
define NETISR_IPV6 NETISR_IPV6
define NETISR_NS NETISR_NS
define NETISR_ISDN NETISR_ISDN
define NETISR_ARP NETISR_ARP
define NETISR_PPP NETISR_PPP
define USPACE USPACE
define ENAMETOOLONG ENAMETOOLONG

View File

@ -1,4 +1,4 @@
/* $NetBSD: intvec.s,v 1.49 2000/06/12 11:13:14 ragge Exp $ */
/* $NetBSD: intvec.s,v 1.50 2000/07/02 04:40:45 cgd Exp $ */
/*
* Copyright (c) 1994, 1997 Ludd, University of Lule}, Sweden.
@ -33,13 +33,7 @@
#include "assym.h"
#include <sys/cdefs.h>
#include "opt_inet.h"
#include "opt_ccitt.h"
#include "opt_iso.h"
#include "opt_ns.h"
#include "arp.h"
#include "ppp.h"
#include <net/netisr.h>
#include "opt_cputype.h"

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.104 2000/06/29 07:14:28 mrg Exp $ */
/* $NetBSD: machdep.c,v 1.105 2000/07/02 04:40:46 cgd Exp $ */
/*
* Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden.
@ -46,9 +46,6 @@
*/
#include "opt_ddb.h"
#include "opt_inet.h"
#include "opt_atalk.h"
#include "opt_ns.h"
#include "opt_compat_netbsd.h"
#include "opt_compat_ultrix.h"
#include "opt_multiprocessor.h"
@ -77,25 +74,6 @@
#include <uvm/uvm_extern.h>
#include <sys/sysctl.h>
#include <net/netisr.h>
#include <net/if.h>
#ifdef INET
#include <netinet/in.h>
#include <netinet/ip_var.h>
#endif
#ifdef NETATALK
#include <netatalk/at_extern.h>
#endif
#ifdef NS
#include <netns/ns_var.h>
#endif
#include "ppp.h" /* For NERISR_PPP */
#if NPPP > 0
#include <net/ppp_defs.h>
#include <net/if_ppp.h>
#endif
#include <machine/sid.h>
#include <machine/pte.h>
#include <machine/mtpr.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.84 2000/06/29 07:07:55 mrg Exp $ */
/* $NetBSD: machdep.c,v 1.85 2000/07/02 04:40:46 cgd Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -43,11 +43,6 @@
*/
#include "opt_ddb.h"
#include "opt_inet.h"
#include "opt_atalk.h"
#include "opt_ccitt.h"
#include "opt_iso.h"
#include "opt_ns.h"
#include "opt_compat_hpux.h"
#include "opt_compat_netbsd.h"
#include "opt_m680x0.h"
@ -950,19 +945,6 @@ badbaddr(addr)
return(0);
}
/*
* XXX Why on earth isn't this in a common file?!
*/
void netintr __P((void));
void arpintr __P((void));
void atintr __P((void));
void ipintr __P((void));
void ip6intr __P((void));
void nsintr __P((void));
void clnlintr __P((void));
void ccittintr __P((void));
void pppintr __P((void));
void
netintr()
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: netisr.h,v 1.19 2000/02/21 20:31:02 erh Exp $ */
/* $NetBSD: netisr.h,v 1.20 2000/07/02 04:40:47 cgd Exp $ */
/*
* Copyright (c) 1980, 1986, 1989, 1993
@ -36,7 +36,7 @@
*/
#ifndef _NET_NETISR_H_
#define _NET_NETISR_H_
#define _NET_NETISR_H_ /* checked by netisr_dispatch.h */
/*
* The networking code runs off software interrupts.
@ -50,6 +50,69 @@
* is defined in the machine-specific include files.
*/
#if defined(_KERNEL)
#include "opt_inet.h"
#include "opt_atalk.h"
#include "opt_ccitt.h"
#include "opt_iso.h"
#include "opt_ns.h"
#include "opt_natm.h"
#if !defined(_LOCORE)
/* XXX struct sockaddr defn for for if.h, if_arp.h */
#include <sys/socket.h>
/*
* XXX IFNAMSIZE for if_ppp.h, natm.h; struct ifnet decl for in6.h, in.h;
* XXX struct mbuf decl for in6.h, in.h, route.h (via in_var.h).
*/
#include <net/if.h>
#ifdef INET
#include <netinet/in.h>
#include <netinet/ip_var.h>
#include "arp.h"
#if NARP > 0
#include <netinet/if_inarp.h>
#endif
#endif
#ifdef INET6
# ifndef INET
# include <netinet/in.h>
# endif
#include <netinet/ip6.h>
#include <netinet6/ip6_var.h>
#endif
#ifdef NS
#include <netns/ns_var.h>
#endif
#ifdef ISO
#include <netiso/iso.h>
#include <netiso/clnp.h>
#endif
#ifdef CCITT
#include <netccitt/x25.h>
#include <netccitt/pk.h>
#include <netccitt/pk_extern.h>
#endif
#ifdef NATM
#include <netnatm/natm.h>
#endif
#ifdef NETATALK
#include <netatalk/at_extern.h>
#endif
#include "ppp.h"
#if NPPP > 0
#include <net/ppp_defs.h>
#include <net/if_ppp.h>
#endif
#endif /* !defined(_LOCORE) */
#endif /* defined(_KERNEL) */
/*
* Each ``pup-level-1'' input queue has a bit in a ``netisr'' status
* word which is used to de-multiplex a single software
@ -68,12 +131,12 @@
#define NETISR_ARP 28 /* same as AF_ARP */
#define NETISR_PPP 31 /* for PPP processing */
#if defined(_KERNEL) && !defined(_LOCORE)
#define schednetisr(anisr) { netisr |= 1<<(anisr); setsoftnet(); }
#ifndef _LOCORE
#ifdef _KERNEL
int netisr; /* scheduling bits for network */
#endif
#endif
#endif /* defined(_KERNEL) && !defined(_LOCORE) */
#endif /* _NET_NETISR_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: netisr_dispatch.h,v 1.1 2000/02/21 20:36:14 erh Exp $ */
/* $NetBSD: netisr_dispatch.h,v 1.2 2000/07/02 04:40:47 cgd Exp $ */
/*
* netisr_dispatch: This file is included by the
@ -14,15 +14,17 @@
* ...do cleanup stuff.
* }
*/
#include "opt_inet.h"
#include "opt_atalk.h"
#include "opt_ccitt.h"
#include "opt_iso.h"
#include "opt_ns.h"
#include "opt_natm.h"
#include "ppp.h"
#ifndef _NET_NETISR_H_
#error <net/netisr.h> must be included before <net/netisr_dispatch.h>
#endif
/*
* When adding functions to this list, be sure to add headers to provide
* their prototypes in <net/netisr.h> (if necessary).
*/
#ifdef INET
#include "arp.h"
#if NARP > 0
DONETISR(NETISR_ARP,arpintr);
#endif