Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions | Variables
swiotlb.h File Reference
#include <linux/types.h>

Go to the source code of this file.

Macros

#define IO_TLB_SEGSIZE   128
 
#define IO_TLB_SHIFT   11
 

Enumerations

enum  dma_sync_target { SYNC_FOR_CPU = 0, SYNC_FOR_DEVICE = 1 }
 

Functions

void swiotlb_init (int verbose)
 
void swiotlb_init_with_tbl (char *tlb, unsigned long nslabs, int verbose)
 
unsigned long swiotlb_nr_tbl (void)
 
int swiotlb_late_init_with_tbl (char *tlb, unsigned long nslabs)
 
voidswiotlb_tbl_map_single (struct device *hwdev, dma_addr_t tbl_dma_addr, phys_addr_t phys, size_t size, enum dma_data_direction dir)
 
void swiotlb_tbl_unmap_single (struct device *hwdev, char *dma_addr, size_t size, enum dma_data_direction dir)
 
void swiotlb_tbl_sync_single (struct device *hwdev, char *dma_addr, size_t size, enum dma_data_direction dir, enum dma_sync_target target)
 
void swiotlb_bounce (phys_addr_t phys, char *dma_addr, size_t size, enum dma_data_direction dir)
 
voidswiotlb_alloc_coherent (struct device *hwdev, size_t size, dma_addr_t *dma_handle, gfp_t flags)
 
void swiotlb_free_coherent (struct device *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle)
 
dma_addr_t swiotlb_map_page (struct device *dev, struct page *page, unsigned long offset, size_t size, enum dma_data_direction dir, struct dma_attrs *attrs)
 
void swiotlb_unmap_page (struct device *hwdev, dma_addr_t dev_addr, size_t size, enum dma_data_direction dir, struct dma_attrs *attrs)
 
int swiotlb_map_sg (struct device *hwdev, struct scatterlist *sg, int nents, enum dma_data_direction dir)
 
void swiotlb_unmap_sg (struct device *hwdev, struct scatterlist *sg, int nents, enum dma_data_direction dir)
 
int swiotlb_map_sg_attrs (struct device *hwdev, struct scatterlist *sgl, int nelems, enum dma_data_direction dir, struct dma_attrs *attrs)
 
void swiotlb_unmap_sg_attrs (struct device *hwdev, struct scatterlist *sgl, int nelems, enum dma_data_direction dir, struct dma_attrs *attrs)
 
void swiotlb_sync_single_for_cpu (struct device *hwdev, dma_addr_t dev_addr, size_t size, enum dma_data_direction dir)
 
void swiotlb_sync_sg_for_cpu (struct device *hwdev, struct scatterlist *sg, int nelems, enum dma_data_direction dir)
 
void swiotlb_sync_single_for_device (struct device *hwdev, dma_addr_t dev_addr, size_t size, enum dma_data_direction dir)
 
void swiotlb_sync_sg_for_device (struct device *hwdev, struct scatterlist *sg, int nelems, enum dma_data_direction dir)
 
int swiotlb_dma_mapping_error (struct device *hwdev, dma_addr_t dma_addr)
 
int swiotlb_dma_supported (struct device *hwdev, u64 mask)
 
void swiotlb_print_info (void)
 

Variables

int swiotlb_force
 

Macro Definition Documentation

#define IO_TLB_SEGSIZE   128

Definition at line 17 of file swiotlb.h.

#define IO_TLB_SHIFT   11

Definition at line 23 of file swiotlb.h.

Enumeration Type Documentation

Enumerator:
SYNC_FOR_CPU 
SYNC_FOR_DEVICE 

Definition at line 33 of file swiotlb.h.

Function Documentation

void* swiotlb_alloc_coherent ( struct device hwdev,
size_t  size,
dma_addr_t dma_handle,
gfp_t  flags 
)

Definition at line 580 of file swiotlb.c.

void swiotlb_bounce ( phys_addr_t  phys,
char dma_addr,
size_t  size,
enum dma_data_direction  dir 
)

Definition at line 349 of file swiotlb.c.

int swiotlb_dma_mapping_error ( struct device hwdev,
dma_addr_t  dma_addr 
)

Definition at line 926 of file swiotlb.c.

int swiotlb_dma_supported ( struct device hwdev,
u64  mask 
)

Definition at line 939 of file swiotlb.c.

void swiotlb_free_coherent ( struct device hwdev,
size_t  size,
void vaddr,
dma_addr_t  dma_handle 
)

Definition at line 629 of file swiotlb.c.

void swiotlb_init ( int  verbose)

Definition at line 196 of file swiotlb.c.

void swiotlb_init_with_tbl ( char tlb,
unsigned long  nslabs,
int  verbose 
)

Definition at line 138 of file swiotlb.c.

int swiotlb_late_init_with_tbl ( char tlb,
unsigned long  nslabs 
)

Definition at line 249 of file swiotlb.c.

dma_addr_t swiotlb_map_page ( struct device dev,
struct page page,
unsigned long  offset,
size_t  size,
enum dma_data_direction  dir,
struct dma_attrs attrs 
)

Definition at line 675 of file swiotlb.c.

int swiotlb_map_sg ( struct device hwdev,
struct scatterlist sg,
int  nents,
enum dma_data_direction  dir 
)

Definition at line 855 of file swiotlb.c.

int swiotlb_map_sg_attrs ( struct device hwdev,
struct scatterlist sgl,
int  nelems,
enum dma_data_direction  dir,
struct dma_attrs attrs 
)

Definition at line 820 of file swiotlb.c.

unsigned long swiotlb_nr_tbl ( void  )

Definition at line 113 of file swiotlb.c.

void swiotlb_print_info ( void  )

Definition at line 125 of file swiotlb.c.

void swiotlb_sync_sg_for_cpu ( struct device hwdev,
struct scatterlist sg,
int  nelems,
enum dma_data_direction  dir 
)

Definition at line 910 of file swiotlb.c.

void swiotlb_sync_sg_for_device ( struct device hwdev,
struct scatterlist sg,
int  nelems,
enum dma_data_direction  dir 
)

Definition at line 918 of file swiotlb.c.

void swiotlb_sync_single_for_cpu ( struct device hwdev,
dma_addr_t  dev_addr,
size_t  size,
enum dma_data_direction  dir 
)

Definition at line 788 of file swiotlb.c.

void swiotlb_sync_single_for_device ( struct device hwdev,
dma_addr_t  dev_addr,
size_t  size,
enum dma_data_direction  dir 
)

Definition at line 796 of file swiotlb.c.

void* swiotlb_tbl_map_single ( struct device hwdev,
dma_addr_t  tbl_dma_addr,
phys_addr_t  phys,
size_t  size,
enum dma_data_direction  dir 
)

Definition at line 387 of file swiotlb.c.

void swiotlb_tbl_sync_single ( struct device hwdev,
char dma_addr,
size_t  size,
enum dma_data_direction  dir,
enum dma_sync_target  target 
)

Definition at line 551 of file swiotlb.c.

void swiotlb_tbl_unmap_single ( struct device hwdev,
char dma_addr,
size_t  size,
enum dma_data_direction  dir 
)

Definition at line 509 of file swiotlb.c.

void swiotlb_unmap_page ( struct device hwdev,
dma_addr_t  dev_addr,
size_t  size,
enum dma_data_direction  dir,
struct dma_attrs attrs 
)

Definition at line 748 of file swiotlb.c.

void swiotlb_unmap_sg ( struct device hwdev,
struct scatterlist sg,
int  nents,
enum dma_data_direction  dir 
)

Definition at line 882 of file swiotlb.c.

void swiotlb_unmap_sg_attrs ( struct device hwdev,
struct scatterlist sgl,
int  nelems,
enum dma_data_direction  dir,
struct dma_attrs attrs 
)

Definition at line 867 of file swiotlb.c.

Variable Documentation

int swiotlb_force

Definition at line 53 of file swiotlb.c.