summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2007-04-13 18:57:50 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2007-04-13 18:57:50 +0000
commit8dcbe71580f80a022d075e6454486bc9d964c765 (patch)
treea758a75bd2f6e39d8ea45545b501abbee0430ef1 /sys/arch/sparc64
parent977eb8538189c8e232f80c85b5a0416ec6cd3670 (diff)
While splitting flags and pqflags might have been a good idea in theory
to separate locking, on most modern machines this is not enough since operations on short types touch other short types that share the same word in memory. Merge pg_flags and pqflags again and now use atomic operations to change the flags. Also bump wire_count to an int and pg_version might go int as well, just for alignment. tested by many, many. ok miod@
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r--sys/arch/sparc64/sparc64/pmap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/sparc64/sparc64/pmap.c b/sys/arch/sparc64/sparc64/pmap.c
index c7239cc19e3..90804715e5b 100644
--- a/sys/arch/sparc64/sparc64/pmap.c
+++ b/sys/arch/sparc64/sparc64/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.36 2007/04/05 20:08:30 claudio Exp $ */
+/* $OpenBSD: pmap.c,v 1.37 2007/04/13 18:57:49 art Exp $ */
/* $NetBSD: pmap.c,v 1.107 2001/08/31 16:47:41 eeh Exp $ */
#undef NO_VCACHE /* Don't forget the locked TLB in dostart */
/*
@@ -3679,7 +3679,7 @@ vm_page_alloc1()
struct vm_page *pg = uvm_pagealloc(NULL, 0, NULL, UVM_PGA_USERESERVE);
if (pg) {
pg->wire_count = 1; /* no mappings yet */
- pg->pg_flags &= ~PG_BUSY; /* never busy */
+ atomic_clearbits_int(&pg->pg_flags, PG_BUSY);
}
return pg;
}
@@ -3702,7 +3702,7 @@ vm_page_free1(mem)
Debugger();
return;
}
- mem->pg_flags |= PG_BUSY;
+ atomic_setbits_int(&mem->pg_flags, PG_BUSY);
mem->wire_count = 0;
uvm_pagefree(mem);
}