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

Go to the source code of this file.

Data Structures

struct  iova
 
struct  iova_domain
 

Macros

#define IOVA_START_PFN   (1)
 

Functions

struct iovaalloc_iova_mem (void)
 
void free_iova_mem (struct iova *iova)
 
void free_iova (struct iova_domain *iovad, unsigned long pfn)
 
void __free_iova (struct iova_domain *iovad, struct iova *iova)
 
struct iovaalloc_iova (struct iova_domain *iovad, unsigned long size, unsigned long limit_pfn, bool size_aligned)
 
struct iovareserve_iova (struct iova_domain *iovad, unsigned long pfn_lo, unsigned long pfn_hi)
 
void copy_reserved_iova (struct iova_domain *from, struct iova_domain *to)
 
void init_iova_domain (struct iova_domain *iovad, unsigned long pfn_32bit)
 
struct iovafind_iova (struct iova_domain *iovad, unsigned long pfn)
 
void put_iova_domain (struct iova_domain *iovad)
 

Macro Definition Documentation

#define IOVA_START_PFN   (1)

Definition at line 20 of file iova.h.

Function Documentation

void __free_iova ( struct iova_domain iovad,
struct iova iova 
)

__free_iova - frees the given iova : iova domain in question. : iova in question. Frees the given iova belonging to the giving domain

Definition at line 286 of file iova.c.

struct iova* alloc_iova ( struct iova_domain iovad,
unsigned long  size,
unsigned long  limit_pfn,
bool  size_aligned 
)
read

alloc_iova - allocates an iova : - iova domain in question : - size of page frames to allocate : - max limit address : - set if size_aligned address range is required This function allocates an iova in the range limit_pfn to IOVA_START_PFN looking from limit_pfn instead from IOVA_START_PFN. If the size_aligned flag is set then the allocated address iova->pfn_lo will be naturally aligned on roundup_power_of_two(size).

Definition at line 211 of file iova.c.

struct iova* alloc_iova_mem ( void  )
read

Definition at line 528 of file intel-iommu.c.

void copy_reserved_iova ( struct iova_domain from,
struct iova_domain to 
)

copy_reserved_iova - copies the reserved between domains : - source doamin from where to copy : - destination domin where to copy This function copies reserved iova's from one doamin to other.

Definition at line 420 of file iova.c.

struct iova* find_iova ( struct iova_domain iovad,
unsigned long  pfn 
)
read

find_iova - find's an iova for a given pfn : - iova domain in question. : - page frame number This function finds and returns an iova belonging to the given doamin which matches the given pfn.

Definition at line 246 of file iova.c.

void free_iova ( struct iova_domain iovad,
unsigned long  pfn 
)

free_iova - finds and frees the iova for a given pfn : - iova domain in question. : - pfn that is allocated previously This functions finds an iova for a given pfn and then frees the iova from that domain.

Definition at line 305 of file iova.c.

void free_iova_mem ( struct iova iova)

Definition at line 533 of file intel-iommu.c.

void init_iova_domain ( struct iova_domain iovad,
unsigned long  pfn_32bit 
)

Definition at line 23 of file iova.c.

void put_iova_domain ( struct iova_domain iovad)

put_iova_domain - destroys the iova doamin : - iova domain in question. All the iova's in that domain are destroyed.

Definition at line 318 of file iova.c.

struct iova* reserve_iova ( struct iova_domain iovad,
unsigned long  pfn_lo,
unsigned long  pfn_hi 
)
read

reserve_iova - reserves an iova in the given range : - iova domain pointer : - lower page frame address :- higher pfn adderss This function allocates reserves the address range from pfn_lo to pfn_hi so that this address is not dished out as part of alloc_iova.

Definition at line 380 of file iova.c.