Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
pci_iommu.c File Reference
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/pci.h>
#include <linux/gfp.h>
#include <linux/bootmem.h>
#include <linux/export.h>
#include <linux/scatterlist.h>
#include <linux/log2.h>
#include <linux/dma-mapping.h>
#include <linux/iommu-helper.h>
#include <asm/io.h>
#include <asm/hwrpb.h>
#include "proto.h"
#include "pci_impl.h"

Go to the source code of this file.

Macros

#define DEBUG_ALLOC   0
 
#define DBGA(args...)
 
#define DBGA2(args...)
 
#define DEBUG_NODIRECT   0
 
#define ISA_DMA_MASK   0x00ffffff
 
#define SG_ENT_VIRT_ADDRESS(SG)   (sg_virt((SG)))
 
#define SG_ENT_PHYS_ADDRESS(SG)   __pa(SG_ENT_VIRT_ADDRESS(SG))
 

Functions

unsigned long size_for_memory (unsigned long max)
 
struct pci_iommu_arena *__init iommu_arena_new_node (int nid, struct pci_controller *hose, dma_addr_t base, unsigned long window_size, unsigned long align)
 
struct pci_iommu_arena *__init iommu_arena_new (struct pci_controller *hose, dma_addr_t base, unsigned long window_size, unsigned long align)
 
int iommu_reserve (struct pci_iommu_arena *arena, long pg_count, long align_mask)
 
int iommu_release (struct pci_iommu_arena *arena, long pg_start, long pg_count)
 
int iommu_bind (struct pci_iommu_arena *arena, long pg_start, long pg_count, struct page **pages)
 
int iommu_unbind (struct pci_iommu_arena *arena, long pg_start, long pg_count)
 
 EXPORT_SYMBOL (dma_ops)
 

Variables

struct dma_map_ops alpha_pci_ops
 
struct dma_map_opsdma_ops = &alpha_pci_ops
 

Macro Definition Documentation

#define DBGA (   args...)

Definition at line 27 of file pci_iommu.c.

#define DBGA2 (   args...)

Definition at line 32 of file pci_iommu.c.

#define DEBUG_ALLOC   0

Definition at line 23 of file pci_iommu.c.

#define DEBUG_NODIRECT   0

Definition at line 35 of file pci_iommu.c.

#define ISA_DMA_MASK   0x00ffffff

Definition at line 37 of file pci_iommu.c.

#define SG_ENT_PHYS_ADDRESS (   SG)    __pa(SG_ENT_VIRT_ADDRESS(SG))

Definition at line 503 of file pci_iommu.c.

#define SG_ENT_VIRT_ADDRESS (   SG)    (sg_virt((SG)))

Definition at line 502 of file pci_iommu.c.

Function Documentation

EXPORT_SYMBOL ( dma_ops  )
struct pci_iommu_arena* __init iommu_arena_new ( struct pci_controller hose,
dma_addr_t  base,
unsigned long  window_size,
unsigned long  align 
)
read

Definition at line 113 of file pci_iommu.c.

struct pci_iommu_arena* __init iommu_arena_new_node ( int  nid,
struct pci_controller hose,
dma_addr_t  base,
unsigned long  window_size,
unsigned long  align 
)
read

Definition at line 58 of file pci_iommu.c.

int iommu_bind ( struct pci_iommu_arena arena,
long  pg_start,
long  pg_count,
struct page **  pages 
)

Definition at line 898 of file pci_iommu.c.

int iommu_release ( struct pci_iommu_arena arena,
long  pg_start,
long  pg_count 
)

Definition at line 879 of file pci_iommu.c.

int iommu_reserve ( struct pci_iommu_arena arena,
long  pg_count,
long  align_mask 
)

Definition at line 848 of file pci_iommu.c.

int iommu_unbind ( struct pci_iommu_arena arena,
long  pg_start,
long  pg_count 
)

Definition at line 927 of file pci_iommu.c.

unsigned long size_for_memory ( unsigned long  max)

Definition at line 49 of file pci_iommu.c.

Variable Documentation

struct dma_map_ops alpha_pci_ops
Initial value:
= {
.alloc = alpha_pci_alloc_coherent,
.free = alpha_pci_free_coherent,
.map_page = alpha_pci_map_page,
.unmap_page = alpha_pci_unmap_page,
.map_sg = alpha_pci_map_sg,
.unmap_sg = alpha_pci_unmap_sg,
.mapping_error = alpha_pci_mapping_error,
.dma_supported = alpha_pci_supported,
.set_dma_mask = alpha_pci_set_mask,
}

Definition at line 956 of file pci_iommu.c.

Definition at line 968 of file pci_iommu.c.