Index Index for
Section 9
Index Alphabetical
listing for D
Bottom of page Bottom of
page

dma_map_dealloc(9r)

NAME

dma_map_dealloc - General: Releases and deallocates the DMA resources previously allocated for DMA data transfers

SYNOPSIS

#include <io/common/devdriver.h> int dma_map_dealloc( dma_handle_t dma_handle );

ARGUMENTS

dma_handle Specifies a handle to DMA resources associated with the mapping of an in-memory I/O buffer onto a controller's I/O bus. This handle provides the information to access bus address/byte count pairs. A bus address/byte count pair is represented by the ba and bc members of an sg_entry structure pointer. Device driver writers can view the DMA handle as the tag to the allocated system resources needed to perform a DMA operation.

DESCRIPTION

The dma_map_dealloc interface releases and deallocates the resources for DMA data transfers that were previously allocated in a call to dma_map_alloc or dma_map_load.

NOTES

Use of the dma_map_dealloc interface makes device drivers more portable between DMA hardware-mapping implementations across different hardware platforms because it masks out any future changes in the kernel- and system-level DMA mapping data structures.

EXAMPLE

See Writing Device Drivers: Tutorial for a code example of the dma_map_dealloc interface.

RETURN VALUES

Upon successful completion, dma_map_dealloc returns the value 1. Otherwise, it returns the value zero (0).

SEE ALSO

Kernel Interfaces: dma_map_alloc(9r), dma_map_load(9r), dma_map_unload(9r) Data Structures: sg_entry(9s)

Index Index for
Section 9
Index Alphabetical
listing for D
Top of page Top of
page