summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2002-12-28 21:14:44 +0000
committeralc <alc@FreeBSD.org>2002-12-28 21:14:44 +0000
commitf9a17edba9d6cc5da0020776d6958ff94ea597fe (patch)
treed363b0717dc9ff1e546d1a3b968f05a3172b6979 /sys/sparc64
parentc46acaed852d5d2348f7d83c418247fa9b2afa11 (diff)
downloadFreeBSD-src-f9a17edba9d6cc5da0020776d6958ff94ea597fe.zip
FreeBSD-src-f9a17edba9d6cc5da0020776d6958ff94ea597fe.tar.gz
Hold the page queues lock around calls to vm_page_flag_clear() and
vm_page_wakeup().
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/sparc64/pmap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/sparc64/sparc64/pmap.c b/sys/sparc64/sparc64/pmap.c
index f30eb39..14c49e8 100644
--- a/sys/sparc64/sparc64/pmap.c
+++ b/sys/sparc64/sparc64/pmap.c
@@ -964,9 +964,11 @@ pmap_new_thread(struct thread *td, int pages)
VM_ALLOC_NORMAL | VM_ALLOC_RETRY | VM_ALLOC_WIRED);
ma[i] = m;
+ vm_page_lock_queues();
vm_page_wakeup(m);
vm_page_flag_clear(m, PG_ZERO);
m->valid = VM_PAGE_BITS_ALL;
+ vm_page_unlock_queues();
}
/*
@@ -1144,9 +1146,11 @@ pmap_pinit(pmap_t pm)
if ((m->flags & PG_ZERO) == 0)
pmap_zero_page(m);
+ vm_page_lock_queues();
vm_page_flag_clear(m, PG_BUSY);
m->valid = VM_PAGE_BITS_ALL;
m->md.pmap = pm;
+ vm_page_unlock_queues();
ma[i] = m;
}
OpenPOWER on IntegriCloud