Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
iommu_common.h File Reference
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/scatterlist.h>
#include <linux/device.h>
#include <linux/iommu-helper.h>
#include <asm/iommu.h>
#include <asm/scatterlist.h>

Go to the source code of this file.

Macros

#define IO_PAGE_SHIFT   13
 
#define IO_PAGE_SIZE   (1UL << IO_PAGE_SHIFT)
 
#define IO_PAGE_MASK   (~(IO_PAGE_SIZE-1))
 
#define IO_PAGE_ALIGN(addr)   ALIGN(addr, IO_PAGE_SIZE)
 
#define IO_TSB_ENTRIES   (128*1024)
 
#define IO_TSB_SIZE   (IO_TSB_ENTRIES * 8)
 
#define IOMMU_PAGE_SHIFT   13
 
#define SG_ENT_PHYS_ADDRESS(SG)   (__pa(sg_virt((SG))))
 

Functions

unsigned long iommu_range_alloc (struct device *dev, struct iommu *iommu, unsigned long npages, unsigned long *handle)
 
void iommu_range_free (struct iommu *iommu, dma_addr_t dma_addr, unsigned long npages)
 

Macro Definition Documentation

#define IO_PAGE_ALIGN (   addr)    ALIGN(addr, IO_PAGE_SIZE)

Definition at line 26 of file iommu_common.h.

#define IO_PAGE_MASK   (~(IO_PAGE_SIZE-1))

Definition at line 25 of file iommu_common.h.

#define IO_PAGE_SHIFT   13

Definition at line 23 of file iommu_common.h.

#define IO_PAGE_SIZE   (1UL << IO_PAGE_SHIFT)

Definition at line 24 of file iommu_common.h.

#define IO_TSB_ENTRIES   (128*1024)

Definition at line 28 of file iommu_common.h.

#define IO_TSB_SIZE   (IO_TSB_ENTRIES * 8)

Definition at line 29 of file iommu_common.h.

#define IOMMU_PAGE_SHIFT   13

Definition at line 34 of file iommu_common.h.

#define SG_ENT_PHYS_ADDRESS (   SG)    (__pa(sg_virt((SG))))

Definition at line 36 of file iommu_common.h.

Function Documentation

unsigned long iommu_range_alloc ( struct device dev,
struct iommu iommu,
unsigned long  npages,
unsigned long handle 
)

Definition at line 96 of file iommu.c.

void iommu_range_free ( struct iommu iommu,
dma_addr_t  dma_addr,
unsigned long  npages 
)

Definition at line 167 of file iommu.c.