diff options
author | jhb <jhb@FreeBSD.org> | 2001-01-30 00:35:35 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-01-30 00:35:35 +0000 |
commit | 5f8a4ce890173d98daf6e92924a45a4fff5d66fa (patch) | |
tree | 9e70e76a81d9abb5935c702f8833d1368f90aac1 | |
parent | 41bdca440221b8e0fe3e3146841dc105b0b06197 (diff) | |
download | FreeBSD-src-5f8a4ce890173d98daf6e92924a45a4fff5d66fa.zip FreeBSD-src-5f8a4ce890173d98daf6e92924a45a4fff5d66fa.tar.gz |
Remove unnecessary locking to protect the p_upages_obj and p_addr
pointers.
-rw-r--r-- | sys/alpha/alpha/pmap.c | 10 | ||||
-rw-r--r-- | sys/amd64/amd64/pmap.c | 6 | ||||
-rw-r--r-- | sys/i386/i386/pmap.c | 6 |
3 files changed, 0 insertions, 22 deletions
diff --git a/sys/alpha/alpha/pmap.c b/sys/alpha/alpha/pmap.c index cbd44ae..4dd81ad 100644 --- a/sys/alpha/alpha/pmap.c +++ b/sys/alpha/alpha/pmap.c @@ -926,14 +926,10 @@ pmap_new_proc(struct proc *p) /* * allocate object for the upages */ - PROC_LOCK(p); if ((upobj = p->p_upages_obj) == NULL) { - PROC_UNLOCK(p); upobj = vm_object_allocate( OBJT_DEFAULT, UPAGES); - PROC_LOCK(p); p->p_upages_obj = upobj; } - PROC_UNLOCK(p); /* get a kernel virtual address for the UPAGES for this proc */ if ((up = p->p_addr) == NULL) { @@ -988,9 +984,7 @@ pmap_dispose_proc(p) vm_page_t m; pt_entry_t *ptek, oldpte; - PROC_LOCK(p); upobj = p->p_upages_obj; - PROC_UNLOCK(p); ptek = vtopte((vm_offset_t) p->p_addr); for(i=0;i<UPAGES;i++) { @@ -1025,9 +1019,7 @@ pmap_swapout_proc(p) */ alpha_fpstate_save(p, 1); - PROC_LOCK(p); upobj = p->p_upages_obj; - PROC_UNLOCK(p); /* * let the upages be paged */ @@ -1051,9 +1043,7 @@ pmap_swapin_proc(p) vm_object_t upobj; vm_page_t m; - PROC_LOCK(p); upobj = p->p_upages_obj; - PROC_UNLOCK(p); for(i=0;i<UPAGES;i++) { m = vm_page_grab(upobj, i, VM_ALLOC_NORMAL | VM_ALLOC_RETRY); diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index b7c0d0f..b41dfb0 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -816,25 +816,19 @@ pmap_new_proc(p) /* * allocate object for the upages */ - PROC_LOCK(p); if ((upobj = p->p_upages_obj) == NULL) { - PROC_UNLOCK(p); upobj = vm_object_allocate( OBJT_DEFAULT, UPAGES); - PROC_LOCK(p); p->p_upages_obj = upobj; } /* get a kernel virtual address for the UPAGES for this proc */ if ((up = p->p_addr) == NULL) { - PROC_UNLOCK(p); up = (struct user *) kmem_alloc_nofault(kernel_map, UPAGES * PAGE_SIZE); if (up == NULL) panic("pmap_new_proc: u_map allocation failed"); - PROC_LOCK(p); p->p_addr = up; } - PROC_UNLOCK(p); ptek = (unsigned *) vtopte((vm_offset_t) up); diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index b7c0d0f..b41dfb0 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -816,25 +816,19 @@ pmap_new_proc(p) /* * allocate object for the upages */ - PROC_LOCK(p); if ((upobj = p->p_upages_obj) == NULL) { - PROC_UNLOCK(p); upobj = vm_object_allocate( OBJT_DEFAULT, UPAGES); - PROC_LOCK(p); p->p_upages_obj = upobj; } /* get a kernel virtual address for the UPAGES for this proc */ if ((up = p->p_addr) == NULL) { - PROC_UNLOCK(p); up = (struct user *) kmem_alloc_nofault(kernel_map, UPAGES * PAGE_SIZE); if (up == NULL) panic("pmap_new_proc: u_map allocation failed"); - PROC_LOCK(p); p->p_addr = up; } - PROC_UNLOCK(p); ptek = (unsigned *) vtopte((vm_offset_t) up); |