Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/cortex Add a missing mutex exit.



details:   https://anonhg.NetBSD.org/src/rev/99e3c50b1f23
branches:  trunk
changeset: 782137:99e3c50b1f23
user:      matt <matt%NetBSD.org@localhost>
date:      Wed Oct 17 20:45:49 2012 +0000

description:
Add a missing mutex exit.

diffstat:

 sys/arch/arm/cortex/pl310.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r eb8fb608aa43 -r 99e3c50b1f23 sys/arch/arm/cortex/pl310.c
--- a/sys/arch/arm/cortex/pl310.c       Wed Oct 17 20:44:48 2012 +0000
+++ b/sys/arch/arm/cortex/pl310.c       Wed Oct 17 20:45:49 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pl310.c,v 1.6 2012/09/22 00:33:37 matt Exp $   */
+/*     $NetBSD: pl310.c,v 1.7 2012/10/17 20:45:49 matt Exp $   */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pl310.c,v 1.6 2012/09/22 00:33:37 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pl310.c,v 1.7 2012/10/17 20:45:49 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -289,8 +289,10 @@
                psize_t seglen = min(len, PAGE_SIZE - off);
 
                mutex_spin_enter(&sc->sc_lock);
-               if (!sc->sc_enabled)
+               if (!sc->sc_enabled) {
+                       mutex_spin_exit(&sc->sc_lock);
                        return;
+               }
                for (paddr_t segend = pa + seglen; pa < segend; pa += line_size) {
                        arml2cc_cache_op(sc, cache_op, pa);
                }



Home | Main Index | Thread Index | Old Index