diff options
author | bde <bde@FreeBSD.org> | 1998-06-03 07:56:59 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-06-03 07:56:59 +0000 |
commit | fa3e2fa6ad5fda143a8059788672e7561a0b5e4a (patch) | |
tree | 8086d823c94fb0f18cf451a2f2ab78c7e7cb6bfb /sys | |
parent | 903a43c624cb4c0aea332463313f2451a4682621 (diff) | |
download | FreeBSD-src-fa3e2fa6ad5fda143a8059788672e7561a0b5e4a.zip FreeBSD-src-fa3e2fa6ad5fda143a8059788672e7561a0b5e4a.tar.gz |
Ifdefed the netisr support.
PR: 6760
Reviewed by: joerg
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/machdep.c | 23 | ||||
-rw-r--r-- | sys/i386/i386/machdep.c | 23 |
2 files changed, 42 insertions, 4 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index dbfa555..d57a2f0 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -35,14 +35,18 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.296 1998/05/19 08:58:46 phk Exp $ + * $Id: machdep.c,v 1.297 1998/05/28 09:29:57 phk Exp $ */ #include "apm.h" +#include "ether.h" #include "npx.h" +#include "opt_atalk.h" #include "opt_bounce.h" #include "opt_cpu.h" #include "opt_ddb.h" +#include "opt_inet.h" +#include "opt_ipx.h" #include "opt_maxmem.h" #include "opt_msgbuf.h" #include "opt_perfmon.h" @@ -97,7 +101,14 @@ #include <ddb/ddb.h> +#if defined(INET) || defined(IPX) || defined(NATM) || defined(NETATALK) \ + || NETHER > 0 || defined(NS) +#define NETISR +#endif + +#ifdef NETISR #include <net/netisr.h> +#endif #if NAPM > 0 #include <machine/apm_bios.h> @@ -190,12 +201,16 @@ vm_offset_t phys_avail[10]; /* must be 2 less so 0 0 can signal end of chunks */ #define PHYS_AVAIL_ARRAY_END ((sizeof(phys_avail) / sizeof(vm_offset_t)) - 2) -static void setup_netisrs __P((struct linker_set *)); /* XXX declare elsewhere */ +#ifdef NETISR +static void setup_netisrs __P((struct linker_set *)); +#endif static vm_offset_t buffer_sva, buffer_eva; vm_offset_t clean_sva, clean_eva; static vm_offset_t pager_sva, pager_eva; +#ifdef NETISR extern struct linker_set netisr_set; +#endif #define offsetof(type, member) ((size_t)(&((type *)0)->member)) @@ -240,10 +255,12 @@ cpu_startup(dummy) } } +#ifdef NETISR /* * Quickly wire in netisrs. */ setup_netisrs(&netisr_set); +#endif /* * Calculate callout wheel size @@ -418,6 +435,7 @@ again: #endif /* SMP */ } +#ifdef NETISR int register_netisr(num, handler) int num; @@ -444,6 +462,7 @@ setup_netisrs(ls) register_netisr(nit->nit_num, nit->nit_isr); } } +#endif /* NETISR */ /* * Send an interrupt to process. diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index dbfa555..d57a2f0 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -35,14 +35,18 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.296 1998/05/19 08:58:46 phk Exp $ + * $Id: machdep.c,v 1.297 1998/05/28 09:29:57 phk Exp $ */ #include "apm.h" +#include "ether.h" #include "npx.h" +#include "opt_atalk.h" #include "opt_bounce.h" #include "opt_cpu.h" #include "opt_ddb.h" +#include "opt_inet.h" +#include "opt_ipx.h" #include "opt_maxmem.h" #include "opt_msgbuf.h" #include "opt_perfmon.h" @@ -97,7 +101,14 @@ #include <ddb/ddb.h> +#if defined(INET) || defined(IPX) || defined(NATM) || defined(NETATALK) \ + || NETHER > 0 || defined(NS) +#define NETISR +#endif + +#ifdef NETISR #include <net/netisr.h> +#endif #if NAPM > 0 #include <machine/apm_bios.h> @@ -190,12 +201,16 @@ vm_offset_t phys_avail[10]; /* must be 2 less so 0 0 can signal end of chunks */ #define PHYS_AVAIL_ARRAY_END ((sizeof(phys_avail) / sizeof(vm_offset_t)) - 2) -static void setup_netisrs __P((struct linker_set *)); /* XXX declare elsewhere */ +#ifdef NETISR +static void setup_netisrs __P((struct linker_set *)); +#endif static vm_offset_t buffer_sva, buffer_eva; vm_offset_t clean_sva, clean_eva; static vm_offset_t pager_sva, pager_eva; +#ifdef NETISR extern struct linker_set netisr_set; +#endif #define offsetof(type, member) ((size_t)(&((type *)0)->member)) @@ -240,10 +255,12 @@ cpu_startup(dummy) } } +#ifdef NETISR /* * Quickly wire in netisrs. */ setup_netisrs(&netisr_set); +#endif /* * Calculate callout wheel size @@ -418,6 +435,7 @@ again: #endif /* SMP */ } +#ifdef NETISR int register_netisr(num, handler) int num; @@ -444,6 +462,7 @@ setup_netisrs(ls) register_netisr(nit->nit_num, nit->nit_isr); } } +#endif /* NETISR */ /* * Send an interrupt to process. |