Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
dma-mapping.c File Reference
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/gfp.h>
#include <linux/errno.h>
#include <linux/list.h>
#include <linux/init.h>
#include <linux/device.h>
#include <linux/dma-mapping.h>
#include <linux/dma-contiguous.h>
#include <linux/highmem.h>
#include <linux/memblock.h>
#include <linux/slab.h>
#include <linux/iommu.h>
#include <linux/io.h>
#include <linux/vmalloc.h>
#include <linux/sizes.h>
#include <asm/memory.h>
#include <asm/highmem.h>
#include <asm/cacheflush.h>
#include <asm/tlbflush.h>
#include <asm/mach/arch.h>
#include <asm/dma-iommu.h>
#include <asm/mach/map.h>
#include <asm/system_info.h>
#include <asm/dma-contiguous.h>
#include "mm.h"

Go to the source code of this file.

Macros

#define nommu()   1
 
#define __get_dma_pgprot(attrs, prot)   __pgprot(0)
 
#define __alloc_remap_buffer(dev, size, gfp, prot, ret, c)   NULL
 
#define __alloc_from_pool(size, ret_page)   NULL
 
#define __alloc_from_contiguous(dev, size, prot, ret)   NULL
 
#define __free_from_pool(cpu_addr, size)   0
 
#define __free_from_contiguous(dev, page, size)   do { } while (0)
 
#define __dma_free_remap(cpu_addr, size)   do { } while (0)
 
#define PREALLOC_DMA_DEBUG_ENTRIES   4096
 

Functions

 EXPORT_SYMBOL (arm_dma_ops)
 
 EXPORT_SYMBOL (arm_coherent_dma_ops)
 
voidarm_dma_alloc (struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp, struct dma_attrs *attrs)
 
int arm_dma_mmap (struct device *dev, struct vm_area_struct *vma, void *cpu_addr, dma_addr_t dma_addr, size_t size, struct dma_attrs *attrs)
 
void arm_dma_free (struct device *dev, size_t size, void *cpu_addr, dma_addr_t handle, struct dma_attrs *attrs)
 
int arm_dma_get_sgtable (struct device *dev, struct sg_table *sgt, void *cpu_addr, dma_addr_t handle, size_t size, struct dma_attrs *attrs)
 
int arm_dma_map_sg (struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir, struct dma_attrs *attrs)
 
void arm_dma_unmap_sg (struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir, struct dma_attrs *attrs)
 
void arm_dma_sync_sg_for_cpu (struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir)
 
void arm_dma_sync_sg_for_device (struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir)
 
int dma_supported (struct device *dev, u64 mask)
 
 EXPORT_SYMBOL (dma_supported)
 
 fs_initcall (dma_debug_do_init)
 

Variables

struct dma_map_ops arm_dma_ops
 
struct dma_map_ops arm_coherent_dma_ops
 

Macro Definition Documentation

#define __alloc_from_contiguous (   dev,
  size,
  prot,
  ret 
)    NULL

Definition at line 588 of file dma-mapping.c.

#define __alloc_from_pool (   size,
  ret_page 
)    NULL

Definition at line 587 of file dma-mapping.c.

#define __alloc_remap_buffer (   dev,
  size,
  gfp,
  prot,
  ret,
  c 
)    NULL

Definition at line 586 of file dma-mapping.c.

#define __dma_free_remap (   cpu_addr,
  size 
)    do { } while (0)

Definition at line 591 of file dma-mapping.c.

#define __free_from_contiguous (   dev,
  page,
  size 
)    do { } while (0)

Definition at line 590 of file dma-mapping.c.

#define __free_from_pool (   cpu_addr,
  size 
)    0

Definition at line 589 of file dma-mapping.c.

#define __get_dma_pgprot (   attrs,
  prot 
)    __pgprot(0)

Definition at line 585 of file dma-mapping.c.

#define nommu ( )    1

Definition at line 583 of file dma-mapping.c.

#define PREALLOC_DMA_DEBUG_ENTRIES   4096

Definition at line 984 of file dma-mapping.c.

Function Documentation

void* arm_dma_alloc ( struct device dev,
size_t  size,
dma_addr_t handle,
gfp_t  gfp,
struct dma_attrs attrs 
)

Definition at line 662 of file dma-mapping.c.

void arm_dma_free ( struct device dev,
size_t  size,
void cpu_addr,
dma_addr_t  handle,
struct dma_attrs attrs 
)

Definition at line 748 of file dma-mapping.c.

int arm_dma_get_sgtable ( struct device dev,
struct sg_table sgt,
void cpu_addr,
dma_addr_t  handle,
size_t  size,
struct dma_attrs attrs 
)

Definition at line 760 of file dma-mapping.c.

int arm_dma_map_sg ( struct device dev,
struct scatterlist sg,
int  nents,
enum dma_data_direction  dir,
struct dma_attrs attrs 
)

Definition at line 876 of file dma-mapping.c.

int arm_dma_mmap ( struct device dev,
struct vm_area_struct vma,
void cpu_addr,
dma_addr_t  dma_addr,
size_t  size,
struct dma_attrs attrs 
)

Definition at line 691 of file dma-mapping.c.

void arm_dma_sync_sg_for_cpu ( struct device dev,
struct scatterlist sg,
int  nents,
enum dma_data_direction  dir 
)

Definition at line 929 of file dma-mapping.c.

void arm_dma_sync_sg_for_device ( struct device dev,
struct scatterlist sg,
int  nents,
enum dma_data_direction  dir 
)

Definition at line 948 of file dma-mapping.c.

void arm_dma_unmap_sg ( struct device dev,
struct scatterlist sg,
int  nents,
enum dma_data_direction  dir,
struct dma_attrs attrs 
)

Definition at line 910 of file dma-mapping.c.

int dma_supported ( struct device dev,
u64  mask 
)

Definition at line 966 of file dma-mapping.c.

EXPORT_SYMBOL ( arm_dma_ops  )
EXPORT_SYMBOL ( arm_coherent_dma_ops  )
EXPORT_SYMBOL ( dma_supported  )
fs_initcall ( dma_debug_do_init  )

Variable Documentation

struct dma_map_ops arm_coherent_dma_ops
Initial value:
= {
.alloc = arm_coherent_dma_alloc,
.free = arm_coherent_dma_free,
.mmap = arm_dma_mmap,
.get_sgtable = arm_dma_get_sgtable,
.map_page = arm_coherent_dma_map_page,
.map_sg = arm_dma_map_sg,
.set_dma_mask = arm_dma_set_mask,
}

Definition at line 151 of file dma-mapping.c.

struct dma_map_ops arm_dma_ops
Initial value:
= {
.alloc = arm_dma_alloc,
.free = arm_dma_free,
.mmap = arm_dma_mmap,
.get_sgtable = arm_dma_get_sgtable,
.map_page = arm_dma_map_page,
.unmap_page = arm_dma_unmap_page,
.map_sg = arm_dma_map_sg,
.unmap_sg = arm_dma_unmap_sg,
.sync_single_for_cpu = arm_dma_sync_single_for_cpu,
.sync_single_for_device = arm_dma_sync_single_for_device,
.sync_sg_for_cpu = arm_dma_sync_sg_for_cpu,
.sync_sg_for_device = arm_dma_sync_sg_for_device,
.set_dma_mask = arm_dma_set_mask,
}

Definition at line 129 of file dma-mapping.c.