diff options
author | jhb <jhb@FreeBSD.org> | 2005-04-01 20:00:11 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2005-04-01 20:00:11 +0000 |
commit | a3c6b782c3ed4abd939e54896eed4b89f4d18d21 (patch) | |
tree | c33b91d98e8867bbb1f42b28ab23638d2003f368 /sys/vm/vm.h | |
parent | 9683bbdf3f053a2b65d3ac11aac7a2eec86c559b (diff) | |
download | FreeBSD-src-a3c6b782c3ed4abd939e54896eed4b89f4d18d21.zip FreeBSD-src-a3c6b782c3ed4abd939e54896eed4b89f4d18d21.tar.gz |
- Change the vm_mmap() function to accept an objtype_t parameter specifying
the type of object represented by the handle argument.
- Allow vm_mmap() to map device memory via cdev objects in addition to
vnodes and anonymous memory. Note that mmaping a cdev directly does not
currently perform any MAC checks like mapping a vnode does.
- Unbreak the DRM getbufs ioctl by having it call vm_mmap() directly on the
cdev the ioctl is acting on rather than trying to find a suitable vnode
to map from.
Reviewed by: alc, arch@
Diffstat (limited to 'sys/vm/vm.h')
-rw-r--r-- | sys/vm/vm.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/vm/vm.h b/sys/vm/vm.h index e61b726..102a934 100644 --- a/sys/vm/vm.h +++ b/sys/vm/vm.h @@ -80,6 +80,10 @@ typedef u_char vm_prot_t; /* protection codes */ #define VM_PROT_RW (VM_PROT_READ|VM_PROT_WRITE) #define VM_PROT_DEFAULT VM_PROT_ALL +enum obj_type { OBJT_DEFAULT, OBJT_SWAP, OBJT_VNODE, OBJT_DEVICE, OBJT_PHYS, + OBJT_DEAD }; +typedef u_char objtype_t; + union vm_map_object; typedef union vm_map_object vm_map_object_t; |