'\" t .\" Title: dma_alloc_from_coherent .\" 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_ALLOC_FROM_COHER" "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_alloc_from_coherent \- try to allocate memory from the per\-device coherent area .SH "SYNOPSIS" .HP \w'int\ dma_alloc_from_coherent('u .BI "int dma_alloc_from_coherent(struct\ device\ *\ " "dev" ", ssize_t\ " "size" ", dma_addr_t\ *\ " "dma_handle" ", void\ **\ " "ret" ");" .SH "ARGUMENTS" .PP \fIdev\fR .RS 4 device from which we allocate memory .RE .PP \fIsize\fR .RS 4 size of requested memory area .RE .PP \fIdma_handle\fR .RS 4 This will be filled with the correct dma handle .RE .PP \fIret\fR .RS 4 This pointer will be filled with the virtual address to allocated area\&. .RE .SH "DESCRIPTION" .PP This function should be only called from per\-arch \fBdma_alloc_coherent\fR to support allocation from per\-device coherent memory pools\&. .PP Returns 0 if dma_alloc_coherent should continue with allocating from generic memory areas, or !0 if dma_alloc_coherent should return \fIret\fR\&. .SH "COPYRIGHT" .br