mapping user space buffer

Chuck Tuffli ctuffli at
Tue Aug 8 13:00:29 PDT 2006

I have a driver that supports DMA of user space buffers and had a
couple of questions. The ultimate question (I think) is how to
lock/map/unmap/unlock user space virtual addresses. A quick perusal of
some drivers turned up two approaches: vmapbuf() and the
bus_dmamap_load*() routines. The source for each makes them look
similar, but are they equivalent? Is one preferable? In both cases, it
appears that the driver must first call vslock() on the user virtual
address (and then vsunlock after the transfer completes). Are there
other necessary steps? Is there a good driver that I can use to answer
some of these questions? As usual, TIA.

More information about the Kernel mailing list