summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2008-07-18 21:39:53 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2008-07-18 21:39:53 +0000
commitcfa10c83301a5f76be1340aeddc6a3512a6dd184 (patch)
treec71884a2267556eebdf9165916f6c9b627ed46d2
parentf3c04ba24c858c2e8c0185a3d2495d07b918e483 (diff)
Protect dma operations with splvm instead of splhigh, that's faster than
splbio and won't delay clock interrupts.
-rw-r--r--sys/arch/hp300/dev/dma.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/sys/arch/hp300/dev/dma.c b/sys/arch/hp300/dev/dma.c
index 4a3ff45eb9e..189dfc173ea 100644
--- a/sys/arch/hp300/dev/dma.c
+++ b/sys/arch/hp300/dev/dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dma.c,v 1.18 2007/11/09 17:46:00 miod Exp $ */
+/* $OpenBSD: dma.c,v 1.19 2008/07/18 21:39:52 miod Exp $ */
/* $NetBSD: dma.c,v 1.19 1997/05/05 21:02:39 thorpej Exp $ */
/*
@@ -221,11 +221,7 @@ dmareq(struct dmaqueue *dq)
struct dma_softc *sc = &dma_softc;
int i, chan, s;
-#if 1
- s = splhigh(); /* XXXthorpej */
-#else
- s = splbio();
-#endif
+ s = splvm();
chan = dq->dq_chan;
for (i = NDMACHAN - 1; i >= 0; i--) {
@@ -294,11 +290,7 @@ dmafree(struct dmaqueue *dq)
struct dmaqueue *dn;
int chan, s;
-#if 1
- s = splhigh(); /* XXXthorpej */
-#else
- s = splbio();
-#endif
+ s = splvm();
#ifdef DEBUG
dmatimo[unit] = 0;
@@ -566,7 +558,7 @@ dmatimeout(void *arg)
struct dma_softc *sc = arg;
for (i = 0; i < NDMACHAN; i++) {
- s = splbio();
+ s = splvm();
if (dmatimo[i]) {
if (dmatimo[i] > 1)
printf("dma channel %d timeout #%d\n",