diff options
author | alc <alc@FreeBSD.org> | 2003-08-20 06:11:39 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2003-08-20 06:11:39 +0000 |
commit | f9629cc6502bb565bbf8a788d6b0377ca1568c41 (patch) | |
tree | f913540e60e6d6eeb39e2af26e6646f7b25e2b66 | |
parent | 7161a23a2930596a46c56208219b6e43aebf94ef (diff) | |
download | FreeBSD-src-f9629cc6502bb565bbf8a788d6b0377ca1568c41.zip FreeBSD-src-f9629cc6502bb565bbf8a788d6b0377ca1568c41.tar.gz |
Lock the pmap's tsb object when performing vm_page_grab() on it.
-rw-r--r-- | sys/sparc64/sparc64/pmap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/sparc64/sparc64/pmap.c b/sys/sparc64/sparc64/pmap.c index 29441cd..f4a391b 100644 --- a/sys/sparc64/sparc64/pmap.c +++ b/sys/sparc64/sparc64/pmap.c @@ -980,6 +980,7 @@ pmap_pinit(pmap_t pm) if (pm->pm_tsb_obj == NULL) pm->pm_tsb_obj = vm_object_allocate(OBJT_DEFAULT, TSB_PAGES); + VM_OBJECT_LOCK(pm->pm_tsb_obj); for (i = 0; i < TSB_PAGES; i++) { m = vm_page_grab(pm->pm_tsb_obj, i, VM_ALLOC_RETRY | VM_ALLOC_WIRED | VM_ALLOC_ZERO); @@ -994,6 +995,7 @@ pmap_pinit(pmap_t pm) ma[i] = m; } + VM_OBJECT_UNLOCK(pm->pm_tsb_obj); pmap_qenter((vm_offset_t)pm->pm_tsb, ma, TSB_PAGES); for (i = 0; i < MAXCPU; i++) |