summaryrefslogtreecommitdiffstats
path: root/sys/sys/conf.h
diff options
context:
space:
mode:
authorrnoland <rnoland@FreeBSD.org>2009-12-29 21:51:28 +0000
committerrnoland <rnoland@FreeBSD.org>2009-12-29 21:51:28 +0000
commit3dc3ad8568aae78c6c3ebad44e859a0feac05c38 (patch)
treeffed01a3f1f97aa245caf60848edab318a53aef9 /sys/sys/conf.h
parentb8a003ef1beea7446e2328791d40c81ee37e8bb0 (diff)
downloadFreeBSD-src-3dc3ad8568aae78c6c3ebad44e859a0feac05c38.zip
FreeBSD-src-3dc3ad8568aae78c6c3ebad44e859a0feac05c38.tar.gz
Update d_mmap() to accept vm_ooffset_t and vm_memattr_t.
This replaces d_mmap() with the d_mmap2() implementation and also changes the type of offset to vm_ooffset_t. Purge d_mmap2(). All driver modules will need to be rebuilt since D_VERSION is also bumped. Reviewed by: jhb@ MFC after: Not in this lifetime...
Diffstat (limited to 'sys/sys/conf.h')
-rw-r--r--sys/sys/conf.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/sys/sys/conf.h b/sys/sys/conf.h
index 4d89070..a18d699 100644
--- a/sys/sys/conf.h
+++ b/sys/sys/conf.h
@@ -135,9 +135,7 @@ typedef int d_read_t(struct cdev *dev, struct uio *uio, int ioflag);
typedef int d_write_t(struct cdev *dev, struct uio *uio, int ioflag);
typedef int d_poll_t(struct cdev *dev, int events, struct thread *td);
typedef int d_kqfilter_t(struct cdev *dev, struct knote *kn);
-typedef int d_mmap_t(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr,
- int nprot);
-typedef int d_mmap2_t(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr,
+typedef int d_mmap_t(struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr,
int nprot, vm_memattr_t *memattr);
typedef int d_mmap_single_t(struct cdev *cdev, vm_ooffset_t *offset,
vm_size_t size, struct vm_object **object, int nprot);
@@ -172,7 +170,6 @@ typedef int dumper_t(
#define D_PSEUDO 0x00200000 /* make_dev() can return NULL */
#define D_NEEDGIANT 0x00400000 /* driver want Giant */
#define D_NEEDMINOR 0x00800000 /* driver uses clone_create() */
-#define D_MMAP2 0x01000000 /* driver uses d_mmap2() */
/*
* Version numbers.
@@ -180,7 +177,8 @@ typedef int dumper_t(
#define D_VERSION_00 0x20011966
#define D_VERSION_01 0x17032005 /* Add d_uid,gid,mode & kind */
#define D_VERSION_02 0x28042009 /* Add d_mmap_single */
-#define D_VERSION D_VERSION_02
+#define D_VERSION_03 0x17122009 /* d_mmap takes memattr,vm_ooffset_t */
+#define D_VERSION D_VERSION_03
/*
* Flags used for internal housekeeping
@@ -201,10 +199,7 @@ struct cdevsw {
d_write_t *d_write;
d_ioctl_t *d_ioctl;
d_poll_t *d_poll;
- union {
- d_mmap_t *old;
- d_mmap2_t *new;
- } __d_mmap;
+ d_mmap_t *d_mmap;
d_strategy_t *d_strategy;
dumper_t *d_dump;
d_kqfilter_t *d_kqfilter;
@@ -222,8 +217,6 @@ struct cdevsw {
SLIST_ENTRY(cdevsw) postfree_list;
} __d_giant;
};
-#define d_mmap __d_mmap.old
-#define d_mmap2 __d_mmap.new
#define d_gianttrick __d_giant.gianttrick
#define d_postfree_list __d_giant.postfree_list
OpenPOWER on IntegriCloud