Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
dmapool.h File Reference
#include <asm/io.h>
#include <asm/scatterlist.h>

Go to the source code of this file.

Functions

struct dma_pooldma_pool_create (const char *name, struct device *dev, size_t size, size_t align, size_t allocation)
 
void dma_pool_destroy (struct dma_pool *pool)
 
voiddma_pool_alloc (struct dma_pool *pool, gfp_t mem_flags, dma_addr_t *handle)
 
void dma_pool_free (struct dma_pool *pool, void *vaddr, dma_addr_t addr)
 
struct dma_pooldmam_pool_create (const char *name, struct device *dev, size_t size, size_t align, size_t allocation)
 
void dmam_pool_destroy (struct dma_pool *pool)
 

Function Documentation

void* dma_pool_alloc ( struct dma_pool pool,
gfp_t  mem_flags,
dma_addr_t handle 
)

dma_pool_alloc - get a block of consistent memory : dma pool that will produce the block : GFP_* bitmask : pointer to dma address of block

This returns the kernel virtual address of a currently unused block, and reports its dma address through the handle. If such a memory block can't be allocated, NULL is returned.

Definition at line 302 of file dmapool.c.

struct dma_pool* dma_pool_create ( const char name,
struct device dev,
size_t  size,
size_t  align,
size_t  allocation 
)
read

Definition at line 130 of file dmapool.c.

void dma_pool_destroy ( struct dma_pool pool)

dma_pool_destroy - destroys a pool of dma memory blocks. : dma pool that will be destroyed Context: !in_interrupt()

Caller guarantees that no more memory from the pool is in use, and that nothing will try to use the pool after this call.

Definition at line 260 of file dmapool.c.

void dma_pool_free ( struct dma_pool pool,
void vaddr,
dma_addr_t  dma 
)

dma_pool_free - put block back into dma pool : the dma pool holding the block : virtual address of block : dma address of block

Caller promises neither device nor driver will again touch this block unless it is first re-allocated.

Definition at line 364 of file dmapool.c.

struct dma_pool* dmam_pool_create ( const char name,
struct device dev,
size_t  size,
size_t  align,
size_t  allocation 
)
read

Definition at line 458 of file dmapool.c.

void dmam_pool_destroy ( struct dma_pool pool)

dmam_pool_destroy - Managed dma_pool_destroy() : dma pool that will be destroyed

Managed dma_pool_destroy().

Definition at line 483 of file dmapool.c.