summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/if_ze.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1997-04-26 11:46:25 +0000
committerpeter <peter@FreeBSD.org>1997-04-26 11:46:25 +0000
commit6323aa10bffe459912ba8b2f8592c7ac4ffd8705 (patch)
treebf48960e09e26f0de373de093c89322724bbdd64 /sys/i386/isa/if_ze.c
parent96efe480c0c091aecb2f359675c74aca30f36a4a (diff)
downloadFreeBSD-src-6323aa10bffe459912ba8b2f8592c7ac4ffd8705.zip
FreeBSD-src-6323aa10bffe459912ba8b2f8592c7ac4ffd8705.tar.gz
Man the liferafts! Here comes the long awaited SMP -> -current merge!
There are various options documented in i386/conf/LINT, there is more to come over the next few days. The kernel should run pretty much "as before" without the options to activate SMP mode. There are a handful of known "loose ends" that need to be fixed, but have been put off since the SMP kernel is in a moderately good condition at the moment. This commit is the result of the tinkering and testing over the last 14 months by many people. A special thanks to Steve Passe for implementing the APIC code!
Diffstat (limited to 'sys/i386/isa/if_ze.c')
-rw-r--r--sys/i386/isa/if_ze.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/i386/isa/if_ze.c b/sys/i386/isa/if_ze.c
index f34471d..ac988a9 100644
--- a/sys/i386/isa/if_ze.c
+++ b/sys/i386/isa/if_ze.c
@@ -47,7 +47,7 @@
*/
/*
- * $Id: if_ze.c,v 1.40 1997/02/22 09:36:37 peter Exp $
+ * $Id: if_ze.c,v 1.41 1997/03/24 11:32:55 bde Exp $
*/
/* XXX - Don't mix different PCCARD support code */
@@ -64,6 +64,7 @@
#include "ze.h"
#if NZE > 0
#include "bpfilter.h"
+#include "opt_smp.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -116,6 +117,11 @@
#include <machine/apm_bios.h>
#endif /* NAPM > 0 */
+#if defined(APIC_IO)
+#include <machine/smp.h>
+#include <machine/mpapic.h>
+#endif /* APIC_IO */
+
/*****************************************************************************
* Driver for Ethernet Adapter *
@@ -727,7 +733,11 @@ ze_watchdog(ifp)
#if 1
struct ze_softc *sc = (struct ze_softc *)ifp;
u_char isr, imr;
+#if defined(APIC_IO)
+ u_int imask;
+#else
u_short imask;
+#endif /* APIC_IO */
if(!(ifp->if_flags & IFF_UP))
return;
@@ -745,7 +755,11 @@ ze_watchdog(ifp)
/* read interrupt mask register */
imr = inb (sc->nic_addr + ED_P2_IMR) & 0xff;
+#if defined(APIC_IO)
+ imask = INTRGET();
+#else
imask = inb(IO_ICU2) << 8 | inb(IO_ICU1);
+#endif /* APIC_IO */
log (LOG_ERR, "ze%d: device timeout, isr=%02x, imr=%02x, imask=%04x\n",
ifp->if_unit, isr, imr, imask);
OpenPOWER on IntegriCloud