uio_machdep.c (211049) | uio_machdep.c (218195) |
---|---|
1/*- 2 * Copyright (c) 2004 Alan L. Cox <alc@cs.rice.edu> 3 * Copyright (c) 1982, 1986, 1991, 1993 4 * The Regents of the University of California. All rights reserved. 5 * (c) UNIX System Laboratories, Inc. 6 * All or some portions of this file are derived from material licensed 7 * to the University of California by American Telephone and Telegraph 8 * Co. or Unix System Laboratories, Inc. and are reproduced herein with --- 22 unchanged lines hidden (view full) --- 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * 35 * @(#)kern_subr.c 8.3 (Berkeley) 1/21/94 36 */ 37 38#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2004 Alan L. Cox <alc@cs.rice.edu> 3 * Copyright (c) 1982, 1986, 1991, 1993 4 * The Regents of the University of California. All rights reserved. 5 * (c) UNIX System Laboratories, Inc. 6 * All or some portions of this file are derived from material licensed 7 * to the University of California by American Telephone and Telegraph 8 * Co. or Unix System Laboratories, Inc. and are reproduced herein with --- 22 unchanged lines hidden (view full) --- 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * 35 * @(#)kern_subr.c 8.3 (Berkeley) 1/21/94 36 */ 37 38#include <sys/cdefs.h> |
39__FBSDID("$FreeBSD: head/sys/sparc64/sparc64/uio_machdep.c 211049 2010-08-08 00:01:08Z marius $"); | 39__FBSDID("$FreeBSD: head/sys/sparc64/sparc64/uio_machdep.c 218195 2011-02-02 16:35:10Z mdf $"); |
40 41#include <sys/param.h> 42#include <sys/kernel.h> 43#include <sys/lock.h> 44#include <sys/mutex.h> 45#include <sys/proc.h> 46#include <sys/sf_buf.h> 47#include <sys/systm.h> --- 50 unchanged lines hidden (view full) --- 98 sf = sf_buf_alloc(m, 0); 99 cp = (char *)sf_buf_kva(sf) + page_offset; 100 } else { 101 sf = NULL; 102 cp = (char *)TLB_PHYS_TO_DIRECT(pa) + page_offset; 103 } 104 switch (uio->uio_segflg) { 105 case UIO_USERSPACE: | 40 41#include <sys/param.h> 42#include <sys/kernel.h> 43#include <sys/lock.h> 44#include <sys/mutex.h> 45#include <sys/proc.h> 46#include <sys/sf_buf.h> 47#include <sys/systm.h> --- 50 unchanged lines hidden (view full) --- 98 sf = sf_buf_alloc(m, 0); 99 cp = (char *)sf_buf_kva(sf) + page_offset; 100 } else { 101 sf = NULL; 102 cp = (char *)TLB_PHYS_TO_DIRECT(pa) + page_offset; 103 } 104 switch (uio->uio_segflg) { 105 case UIO_USERSPACE: |
106 if (ticks - PCPU_GET(switchticks) >= hogticks) 107 uio_yield(); | 106 maybe_yield(); |
108 if (uio->uio_rw == UIO_READ) 109 error = copyout(cp, iov->iov_base, cnt); 110 else 111 error = copyin(iov->iov_base, cp, cnt); 112 if (error) { 113 if (sf != NULL) 114 sf_buf_free(sf); 115 goto out; --- 25 unchanged lines hidden --- | 107 if (uio->uio_rw == UIO_READ) 108 error = copyout(cp, iov->iov_base, cnt); 109 else 110 error = copyin(iov->iov_base, cp, cnt); 111 if (error) { 112 if (sf != NULL) 113 sf_buf_free(sf); 114 goto out; --- 25 unchanged lines hidden --- |