Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/hp700/gsc Don't take sc_intr_lock in harmony_trigge...
details: https://anonhg.NetBSD.org/src/rev/5b88efb55150
branches: trunk
changeset: 777578:5b88efb55150
user: skrll <skrll%NetBSD.org@localhost>
date: Thu Feb 23 21:41:23 2012 +0000
description:
Don't take sc_intr_lock in harmony_trigger_input it's already taken by
our caller.
Found by /usr/tests/include/t_paths.
diffstat:
sys/arch/hp700/gsc/harmony.c | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diffs (44 lines):
diff -r f5888eff5f4e -r 5b88efb55150 sys/arch/hp700/gsc/harmony.c
--- a/sys/arch/hp700/gsc/harmony.c Thu Feb 23 21:38:53 2012 +0000
+++ b/sys/arch/hp700/gsc/harmony.c Thu Feb 23 21:41:23 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: harmony.c,v 1.26 2012/02/02 19:42:59 tls Exp $ */
+/* $NetBSD: harmony.c,v 1.27 2012/02/23 21:41:23 skrll Exp $ */
/* $OpenBSD: harmony.c,v 1.23 2004/02/13 21:28:19 mickey Exp $ */
@@ -1259,12 +1259,12 @@
harmony_trigger_input(void *vsc, void *start, void *end, int blksize,
void (*intr)(void *), void *intrarg, const audio_params_t *param)
{
- struct harmony_softc *sc;
- struct harmony_channel *c;
+ struct harmony_softc *sc = vsc;
+ struct harmony_channel *c = &sc->sc_capture;
struct harmony_dma *d;
- sc = vsc;
- c = &sc->sc_capture;
+ KASSERT(mutex_owned(&sc->sc_intr_lock));
+
for (d = sc->sc_dmas; d->d_kva != start; d = d->d_next)
continue;
if (d == NULL) {
@@ -1273,8 +1273,6 @@
return EINVAL;
}
- mutex_spin_enter(&sc->sc_intr_lock);
-
c->c_intr = intr;
c->c_intrarg = intrarg;
c->c_blksz = blksize;
@@ -1288,8 +1286,6 @@
harmony_start_cp(sc, 1);
harmony_intr_enable(sc);
- mutex_spin_exit(&sc->sc_intr_lock);
-
return 0;
}
Home |
Main Index |
Thread Index |
Old Index