diff options
author | alc <alc@FreeBSD.org> | 2004-03-24 23:35:04 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2004-03-24 23:35:04 +0000 |
commit | cab68d38d220a62ea8e133c93ef3c18d1ad3d14e (patch) | |
tree | b1255b36ae3d7a60ff9add42a6ffc8d683d4bd46 /sys | |
parent | 95fba106c85456a62061f86ea8e10b6fd5c67d1f (diff) | |
download | FreeBSD-src-cab68d38d220a62ea8e133c93ef3c18d1ad3d14e.zip FreeBSD-src-cab68d38d220a62ea8e133c93ef3c18d1ad3d14e.tar.gz |
Use uiomove_fromphys() instead of pmap_qenter() and pmap_qremove() in
proc_rwmem().
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/sys_process.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index 636d10b..dcfad3d 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -152,7 +152,6 @@ proc_rwmem(struct proc *p, struct uio *uio) vm_object_t backing_object, object = NULL; vm_offset_t pageno = 0; /* page number */ vm_prot_t reqprot; - vm_offset_t kva; int error, writing; GIANT_REQUIRED; @@ -177,8 +176,6 @@ proc_rwmem(struct proc *p, struct uio *uio) reqprot = writing ? (VM_PROT_WRITE | VM_PROT_OVERRIDE_WRITE) : VM_PROT_READ; - kva = kmem_alloc_nofault(kernel_map, PAGE_SIZE); - /* * Only map in one page at a time. We don't have to, but it * makes things easier. This way is trivial - right? @@ -262,14 +259,10 @@ proc_rwmem(struct proc *p, struct uio *uio) */ vm_map_lookup_done(tmap, out_entry); - pmap_qenter(kva, &m, 1); - /* * Now do the i/o move. */ - error = uiomove((caddr_t)(kva + page_offset), len, uio); - - pmap_qremove(kva, 1); + error = uiomove_fromphys(&m, page_offset, len, uio); /* * Release the page. @@ -280,7 +273,6 @@ proc_rwmem(struct proc *p, struct uio *uio) } while (error == 0 && uio->uio_resid > 0); - kmem_free(kernel_map, kva, PAGE_SIZE); vmspace_free(vm); return (error); } |