From 2094a9b6ce71dca605f438c2b9e29969ff07e2ae Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Wed, 20 Aug 2003 06:11:39 +0000 Subject: [PATCH] Lock the pmap's tsb object when performing vm_page_grab() on it. --- sys/sparc64/sparc64/pmap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/sparc64/sparc64/pmap.c b/sys/sparc64/sparc64/pmap.c index 29441cda33e5..f4a391be623a 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++)