Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/arch/mvme68k/dev Pullup from trunk: 1.20 and 1.21
details: https://anonhg.NetBSD.org/src/rev/f0b4924afaa7
branches: netbsd-1-5
changeset: 488650:f0b4924afaa7
user: scw <scw%NetBSD.org@localhost>
date: Sat Jul 22 15:45:05 2000 +0000
description:
Pullup from trunk: 1.20 and 1.21
Approved by: thorpej
Implement generic soft interrupts for mvme68k.
diffstat:
sys/arch/mvme68k/dev/zs.c | 56 ++++++++--------------------------------------
1 files changed, 10 insertions(+), 46 deletions(-)
diffs (103 lines):
diff -r 981eb775c88d -r f0b4924afaa7 sys/arch/mvme68k/dev/zs.c
--- a/sys/arch/mvme68k/dev/zs.c Sat Jul 22 15:28:47 2000 +0000
+++ b/sys/arch/mvme68k/dev/zs.c Sat Jul 22 15:45:05 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: zs.c,v 1.19 2000/03/18 22:33:05 scw Exp $ */
+/* $NetBSD: zs.c,v 1.19.4.1 2000/07/22 15:45:05 scw Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -63,6 +63,7 @@
#include <machine/cpu.h>
#include <machine/bus.h>
+#include <machine/intr.h>
#include <mvme68k/dev/zsvar.h>
@@ -75,8 +76,6 @@
/* XXX Shouldn't hardcode the minor number... */
int zs_major = 12;
-static u_long zs_sir; /* software interrupt cookie */
-
/* Flags from zscnprobe() */
static int zs_hwflags[NZSC][2];
@@ -210,12 +209,13 @@
}
/*
- * Allocate a software interrupt cookie. Note that the argument
- * "zsc" is never actually used in the software interrupt
- * handler.
+ * Allocate a software interrupt cookie.
*/
- if (zs_sir == 0)
- zs_sir = allocate_sir(zssoft, zsc);
+ zsc->zsc_softintr_cookie = softintr_establish(IPL_SOFTSERIAL,
+ (void (*)(void *)) zsc_intr_soft, zsc);
+#ifdef DEBUG
+ assert(zsc->zsc_softintr_cookie);
+#endif
}
static int
@@ -234,8 +234,6 @@
return UNCONF;
}
-static int zssoftpending;
-
/*
* Our ZS chips all share a common, autovectored interrupt,
* so we have to look at all of them on each interrupt.
@@ -254,46 +252,12 @@
continue;
rval |= zsc_intr_hard(zsc);
if ((zsc->zsc_cs[0]->cs_softreq) ||
- (zsc->zsc_cs[1]->cs_softreq))
- {
- /* zsc_req_softint(zsc); */
- /* We are at splzs here, so no need to lock. */
- if (zssoftpending == 0) {
- zssoftpending = zs_sir;
- setsoftint(zs_sir);
- }
- }
+ (zsc->zsc_cs[1]->cs_softreq))
+ softintr_schedule(zsc->zsc_softintr_cookie);
}
return (rval);
}
-/*
- * Similar scheme as for zshard (look at all of them)
- */
-void
-zssoft(arg)
- void *arg;
-{
- struct zsc_softc *zsc;
- int unit;
-
- /* This is not the only ISR on this IPL. */
- if (zssoftpending == 0)
- return;
-
- /*
- * The soft intr. bit will be set by zshard only if
- * the variable zssoftpending is zero.
- */
- zssoftpending = 0;
-
- for (unit = 0; unit < zsc_cd.cd_ndevs; ++unit) {
- zsc = zsc_cd.cd_devs[unit];
- if (zsc == NULL)
- continue;
- (void) zsc_intr_soft(zsc);
- }
-}
#if 0
/*
Home |
Main Index |
Thread Index |
Old Index