Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/dev Clear the dmamap inside splhigh() prote...



details:   https://anonhg.NetBSD.org/src/rev/97b25c867afd
branches:  trunk
changeset: 515918:97b25c867afd
user:      eeh <eeh%NetBSD.org@localhost>
date:      Mon Oct 08 19:24:20 2001 +0000

description:
Clear the dmamap inside splhigh() protection.

diffstat:

 sys/arch/sparc64/dev/iommu.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (47 lines):

diff -r 7d15b2e91ea4 -r 97b25c867afd sys/arch/sparc64/dev/iommu.c
--- a/sys/arch/sparc64/dev/iommu.c      Mon Oct 08 15:53:07 2001 +0000
+++ b/sys/arch/sparc64/dev/iommu.c      Mon Oct 08 19:24:20 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iommu.c,v 1.42 2001/10/07 20:30:40 eeh Exp $   */
+/*     $NetBSD: iommu.c,v 1.43 2001/10/08 19:24:20 eeh Exp $   */
 
 /*
  * Copyright (c) 1999, 2000 Matthew R. Green
@@ -609,9 +609,9 @@
                        /* How can this fail?  And if it does what can we do? */
                        err = extent_free(is->is_dvmamap,
                                dvmaddr, sgsize, EX_NOWAIT);
-                       splx(s);
                        map->_dm_dvmastart = 0;
                        map->_dm_dvmasize = 0;
+                       splx(s);
                        return (E2BIG);
                }
                sgstart = roundup(sgstart, boundary);
@@ -691,13 +691,13 @@
        s = splhigh();
        error = extent_free(is->is_dvmamap, map->_dm_dvmastart, 
                map->_dm_dvmasize, EX_NOWAIT);
+       map->_dm_dvmastart = 0;
+       map->_dm_dvmasize = 0;
        splx(s);
        if (error != 0)
                printf("warning: %qd of DVMA space lost\n", (long long)sgsize);
 
        /* Clear the map */
-       map->_dm_dvmastart = 0;
-       map->_dm_dvmasize = 0;
 }
 
 
@@ -916,9 +916,9 @@
                        /* How can this fail?  And if it does what can we do? */
                        err = extent_free(is->is_dvmamap,
                                dvmaddr, sgsize, EX_NOWAIT);
-                       splx(s);
                        map->_dm_dvmastart = 0;
                        map->_dm_dvmasize = 0;
+                       splx(s);
                        return (E2BIG);
                }
                sgstart = roundup(sgstart, boundary);



Home | Main Index | Thread Index | Old Index