'\" t .\" Title: dma_buf_mmap .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Device drivers infrastructure .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "DMA_BUF_MMAP" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Device drivers infrastructure" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" dma_buf_mmap \- Setup up a userspace mmap with the given vma .SH "SYNOPSIS" .HP \w'int\ dma_buf_mmap('u .BI "int dma_buf_mmap(struct\ dma_buf\ *\ " "dmabuf" ", struct\ vm_area_struct\ *\ " "vma" ", unsigned\ long\ " "pgoff" ");" .SH "ARGUMENTS" .PP \fIdmabuf\fR .RS 4 [in] buffer that should back the vma .RE .PP \fIvma\fR .RS 4 [in] vma for the mmap .RE .PP \fIpgoff\fR .RS 4 [in] offset in pages where this mmap should start within the dma\-buf buffer\&. .RE .SH "DESCRIPTION" .PP This function adjusts the passed in vma so that it points at the file of the dma_buf operation\&. It also adjusts the starting pgoff and does bounds checking on the size of the vma\&. Then it calls the exporters mmap function to set up the mapping\&. .PP Can return negative error values, returns 0 on success\&. .SH "COPYRIGHT" .br