aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1998-06-03 07:56:59 +0000
committerBruce Evans <bde@FreeBSD.org>1998-06-03 07:56:59 +0000
commit56fe9645513721d0a5e5939dfb236ed2b7d0d048 (patch)
treeefbc33fc589317007a1c6690ca52552be77abdaf /sys
parent70e8940332049ba65e2e8a1a90293b65c4048bcb (diff)
downloadsrc-56fe9645513721d0a5e5939dfb236ed2b7d0d048.tar.gz
src-56fe9645513721d0a5e5939dfb236ed2b7d0d048.zip
Ifdefed the netisr support.
PR: 6760 Reviewed by: joerg
Notes
Notes: svn path=/head/; revision=36605
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/machdep.c23
-rw-r--r--sys/i386/i386/machdep.c23
2 files changed, 42 insertions, 4 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index dbfa555224ff..d57a2f0d4bc8 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 dbfa555224ff..d57a2f0d4bc8 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.