tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: drivers customizing mmap(2)



   Date: Mon, 4 Mar 2013 19:15:37 -0600
   From: David Young <dyoung%pobox.com@localhost>

                                                          I thought that
   perhaps the device's cdevsw could provide an alternate to d_mmap,
   int (*d_get_pagerops)(dev_t, struct uvm_pagerops **) or something,
   for uvm_mmap to call.

This is more or less what FreeBSD did -- they added a d_mmap_single
operation to struct cdevsw,

   int (*d_mmap_single)(struct cdev *, vm_ooffset_t *, vm_size_t,
       struct vm_object **, int);

which returns a vm object rather than a set of pager ops for a vm
object.  This would obviously serve too, since it worked for FreeBSD's
drm purposes, and might be easier to implement.


Home | Main Index | Thread Index | Old Index