FreeBSD kernel kern code
|
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/limits.h>
#include <sys/lock.h>
#include <sys/mman.h>
#include <sys/proc.h>
#include <sys/resourcevar.h>
#include <sys/rwlock.h>
#include <sys/sched.h>
#include <sys/sysctl.h>
#include <sys/vnode.h>
#include <vm/vm.h>
#include <vm/vm_param.h>
#include <vm/vm_extern.h>
#include <vm/vm_page.h>
#include <vm/vm_pageout.h>
#include <vm/vm_map.h>
#include <machine/bus.h>
Go to the source code of this file.
Macros | |
#define | PHYS_PAGE_COUNT(len) (howmany(len, PAGE_SIZE) + 1) |
Functions | |
__FBSDID ("$FreeBSD$") | |
SYSCTL_INT (_kern, KERN_IOV_MAX, iov_max, CTLFLAG_RD, SYSCTL_NULL_INT_PTR, UIO_MAXIOV, "Maximum number of elements in an I/O vector; sysconf(_SC_IOV_MAX)") | |
static int | uiomove_faultflag (void *cp, int n, struct uio *uio, int nofault) |
int | copyin_nofault (const void *udaddr, void *kaddr, size_t len) |
int | copyout_nofault (const void *kaddr, void *udaddr, size_t len) |
int | physcopyin (void *src, vm_paddr_t dst, size_t len) |
int | physcopyout (vm_paddr_t src, void *dst, size_t len) |
int | physcopyin_vlist (bus_dma_segment_t *src, off_t offset, vm_paddr_t dst, size_t len) |
int | physcopyout_vlist (vm_paddr_t src, bus_dma_segment_t *dst, off_t offset, size_t len) |
int | uiomove (void *cp, int n, struct uio *uio) |
int | uiomove_nofault (void *cp, int n, struct uio *uio) |
int | uiomove_frombuf (void *buf, int buflen, struct uio *uio) |
int | ureadc (int c, struct uio *uio) |
int | copyiniov (const struct iovec *iovp, u_int iovcnt, struct iovec **iov, int error) |
int | copyinuio (const struct iovec *iovp, u_int iovcnt, struct uio **uiop) |
struct uio * | cloneuio (struct uio *uiop) |
int | copyout_map (struct thread *td, vm_offset_t *addr, size_t sz) |
int | copyout_unmap (struct thread *td, vm_offset_t addr, size_t sz) |
int32_t | fuword32 (volatile const void *addr) |
long | fuword (volatile const void *addr) |
uint32_t | casuword32 (volatile uint32_t *addr, uint32_t old, uint32_t new) |
u_long | casuword (volatile u_long *addr, u_long old, u_long new) |
#define PHYS_PAGE_COUNT | ( | len | ) | (howmany(len, PAGE_SIZE) + 1) |
Definition at line 96 of file subr_uio.c.
__FBSDID | ( | "$FreeBSD$" | ) |
u_long casuword | ( | volatile u_long * | addr, |
u_long | old, | ||
u_long | new | ||
) |
Definition at line 507 of file subr_uio.c.
References addr.
uint32_t casuword32 | ( | volatile uint32_t * | addr, |
uint32_t | old, | ||
uint32_t | new | ||
) |
Definition at line 497 of file subr_uio.c.
References addr.
Referenced by do_lock_pi().
struct uio * cloneuio | ( | struct uio * | uiop | ) |
Definition at line 401 of file subr_uio.c.
References malloc().
Referenced by dofileread(), dofilewrite(), kern_recvit(), kern_sendit(), log_console(), and vn_io_fault1().
int copyin_nofault | ( | const void * | udaddr, |
void * | kaddr, | ||
size_t | len | ||
) |
Definition at line 75 of file subr_uio.c.
int copyiniov | ( | const struct iovec * | iovp, |
u_int | iovcnt, | ||
struct iovec ** | iov, | ||
int | error | ||
) |
Definition at line 347 of file subr_uio.c.
References free(), and malloc().
Referenced by sys_recvmsg(), and sys_sendmsg().
int copyinuio | ( | const struct iovec * | iovp, |
u_int | iovcnt, | ||
struct uio ** | uiop | ||
) |
Definition at line 365 of file subr_uio.c.
References free(), and malloc().
Referenced by aiocb_copyin(), sendfile(), sys_jail_get(), sys_jail_set(), sys_nmount(), sys_preadv(), sys_pwritev(), sys_readv(), and sys_writev().
int copyout_map | ( | struct thread * | td, |
vm_offset_t * | addr, | ||
size_t | sz | ||
) |
Definition at line 419 of file subr_uio.c.
References addr, and lim_max().
int copyout_nofault | ( | const void * | kaddr, |
void * | udaddr, | ||
size_t | len | ||
) |
Definition at line 86 of file subr_uio.c.
Referenced by stats_v1_blob_clone(), and sysctl_old_user().
int copyout_unmap | ( | struct thread * | td, |
vm_offset_t | addr, | ||
size_t | sz | ||
) |
Definition at line 447 of file subr_uio.c.
References addr.
long fuword | ( | volatile const void * | addr | ) |
Definition at line 487 of file subr_uio.c.
References addr.
Referenced by aiocb_fetch_error(), and aiocb_fetch_status().
int32_t fuword32 | ( | volatile const void * | addr | ) |
Definition at line 465 of file subr_uio.c.
References addr.
Referenced by do_sem2_wait().
int physcopyin | ( | void * | src, |
vm_paddr_t | dst, | ||
size_t | len | ||
) |
Definition at line 99 of file subr_uio.c.
References PHYS_PAGE_COUNT, and src.
Referenced by physcopyin_vlist().
int physcopyin_vlist | ( | bus_dma_segment_t * | src, |
off_t | offset, | ||
vm_paddr_t | dst, | ||
size_t | len | ||
) |
Definition at line 143 of file subr_uio.c.
References physcopyin(), and src.
int physcopyout | ( | vm_paddr_t | src, |
void * | dst, | ||
size_t | len | ||
) |
Definition at line 120 of file subr_uio.c.
References PHYS_PAGE_COUNT, and src.
Referenced by physcopyout_vlist().
int physcopyout_vlist | ( | vm_paddr_t | src, |
bus_dma_segment_t * | dst, | ||
off_t | offset, | ||
size_t | len | ||
) |
Definition at line 169 of file subr_uio.c.
References physcopyout(), and src.
SYSCTL_INT | ( | _kern | , |
KERN_IOV_MAX | , | ||
iov_max | , | ||
CTLFLAG_RD | , | ||
SYSCTL_NULL_INT_PTR | , | ||
UIO_MAXIOV | , | ||
"Maximum number of elements in an I/O vector; sysconf(_SC_IOV_MAX)" | |||
) |
int uiomove | ( | void * | cp, |
int | n, | ||
struct uio * | uio | ||
) |
Definition at line 195 of file subr_uio.c.
References uiomove_faultflag().
Referenced by devread(), eventfd_read(), eventfd_write(), log_console(), logread(), m_mbuftouio(), m_uiotombuf(), m_unmapped_uiomove(), pipe_read(), pipe_write(), ptsdev_write(), sbuf_uionew(), soreceive_dgram(), soreceive_generic(), soreceive_rcvoob(), ttydisc_getc_uio(), ttydisc_write(), ttyinq_read_uio(), ttyoutq_read_uio(), uiomove_frombuf(), uiomove_object_page(), vfs_read_dirent(), vn_io_fault1(), and vn_io_fault_uiomove().
|
static |
Definition at line 209 of file subr_uio.c.
References maybe_yield().
Referenced by uiomove(), and uiomove_nofault().
int uiomove_frombuf | ( | void * | buf, |
int | buflen, | ||
struct uio * | uio | ||
) |
Definition at line 290 of file subr_uio.c.
References buf, and uiomove().
Referenced by mqfs_read().
int uiomove_nofault | ( | void * | cp, |
int | n, | ||
struct uio * | uio | ||
) |
Definition at line 202 of file subr_uio.c.
References uiomove_faultflag().
int ureadc | ( | int | c, |
struct uio * | uio | ||
) |
Definition at line 308 of file subr_uio.c.
References panic().
Referenced by ptsdev_read().