diff options
author | alc <alc@FreeBSD.org> | 2005-02-13 23:09:36 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2005-02-13 23:09:36 +0000 |
commit | 4c99d150db9b8067bc79c48446fe1da203819f5c (patch) | |
tree | 2e0f1c05d50b53005dc2556ecf7a269165d5d37c | |
parent | 55d920055d2bedc63ec21c5bd71bc059bca340b6 (diff) | |
download | FreeBSD-src-4c99d150db9b8067bc79c48446fe1da203819f5c.zip FreeBSD-src-4c99d150db9b8067bc79c48446fe1da203819f5c.tar.gz |
Request a CPU private mapping from sf_buf_alloc().
-rw-r--r-- | sys/i386/i386/uio_machdep.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/i386/i386/uio_machdep.c b/sys/i386/i386/uio_machdep.c index 2110c6c..3558ec0 100644 --- a/sys/i386/i386/uio_machdep.c +++ b/sys/i386/i386/uio_machdep.c @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include <sys/lock.h> #include <sys/mutex.h> #include <sys/proc.h> +#include <sys/sched.h> #include <sys/sf_buf.h> #include <sys/systm.h> #include <sys/uio.h> @@ -84,7 +85,8 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) cnt = n; page_offset = offset & PAGE_MASK; cnt = min(cnt, PAGE_SIZE - page_offset); - sf = sf_buf_alloc(ma[offset >> PAGE_SHIFT], 0); + sched_pin(); + sf = sf_buf_alloc(ma[offset >> PAGE_SHIFT], SFB_CPUPRIVATE); cp = (char *)sf_buf_kva(sf) + page_offset; switch (uio->uio_segflg) { case UIO_USERSPACE: @@ -96,6 +98,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) error = copyin(iov->iov_base, cp, cnt); if (error) { sf_buf_free(sf); + sched_unpin(); goto out; } break; @@ -109,6 +112,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) break; } sf_buf_free(sf); + sched_unpin(); iov->iov_base = (char *)iov->iov_base + cnt; iov->iov_len -= cnt; uio->uio_resid -= cnt; |