diff options
author | Kurt Miller <kurt@cvs.openbsd.org> | 2008-12-18 13:43:25 +0000 |
---|---|---|
committer | Kurt Miller <kurt@cvs.openbsd.org> | 2008-12-18 13:43:25 +0000 |
commit | 650e0cdf12d66b23bc40a46efe127068129ab84a (patch) | |
tree | 8effdc7703dbf818d545de634d46ae1fbd04886d /sys/arch | |
parent | 84d7e7300b69ee29dc341f495bb9c8663140853b (diff) |
use atomic operations to update ptes in pmap_unwire(). okay weingart@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/amd64/amd64/pmap.c | 4 | ||||
-rw-r--r-- | sys/arch/i386/i386/pmap.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/amd64/amd64/pmap.c b/sys/arch/amd64/amd64/pmap.c index 6683435943a..19249b74f24 100644 --- a/sys/arch/amd64/amd64/pmap.c +++ b/sys/arch/amd64/amd64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.33 2008/12/04 15:48:19 weingart Exp $ */ +/* $OpenBSD: pmap.c,v 1.34 2008/12/18 13:43:24 kurt Exp $ */ /* $NetBSD: pmap.c,v 1.3 2003/05/08 18:13:13 thorpej Exp $ */ /* @@ -1938,7 +1938,7 @@ pmap_unwire(struct pmap *pmap, vaddr_t va) panic("pmap_unwire: invalid (unmapped) va 0x%lx", va); #endif if ((ptes[pl1_i(va)] & PG_W) != 0) { - ptes[pl1_i(va)] &= ~PG_W; + pmap_pte_clearbits(&ptes[pl1_i(va)], PG_W); pmap->pm_stats.wired_count--; } #ifdef DIAGNOSTIC diff --git a/sys/arch/i386/i386/pmap.c b/sys/arch/i386/i386/pmap.c index 6b326e92db3..bedde99979a 100644 --- a/sys/arch/i386/i386/pmap.c +++ b/sys/arch/i386/i386/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.132 2008/11/24 16:32:45 art Exp $ */ +/* $OpenBSD: pmap.c,v 1.133 2008/12/18 13:43:24 kurt Exp $ */ /* $NetBSD: pmap.c,v 1.91 2000/06/02 17:46:37 thorpej Exp $ */ /* @@ -2352,7 +2352,7 @@ pmap_unwire(struct pmap *pmap, vaddr_t va) panic("pmap_unwire: invalid (unmapped) va 0x%lx", va); #endif if ((ptes[atop(va)] & PG_W) != 0) { - ptes[atop(va)] &= ~PG_W; + i386_atomic_clearbits_l(&ptes[atop(va)], PG_W); pmap->pm_stats.wired_count--; } #ifdef DIAGNOSTIC |