Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Enumerations | Functions
mthca_memfree.c File Reference
#include <linux/mm.h>
#include <linux/scatterlist.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <asm/page.h>
#include "mthca_memfree.h"
#include "mthca_dev.h"
#include "mthca_cmd.h"

Go to the source code of this file.

Data Structures

struct  mthca_user_db_table
 

Enumerations

enum  { MTHCA_ICM_ALLOC_SIZE = 1 << 18, MTHCA_TABLE_CHUNK_SIZE = 1 << 18 }
 

Functions

void mthca_free_icm (struct mthca_dev *dev, struct mthca_icm *icm, int coherent)
 
struct mthca_icmmthca_alloc_icm (struct mthca_dev *dev, int npages, gfp_t gfp_mask, int coherent)
 
int mthca_table_get (struct mthca_dev *dev, struct mthca_icm_table *table, int obj)
 
void mthca_table_put (struct mthca_dev *dev, struct mthca_icm_table *table, int obj)
 
voidmthca_table_find (struct mthca_icm_table *table, int obj, dma_addr_t *dma_handle)
 
int mthca_table_get_range (struct mthca_dev *dev, struct mthca_icm_table *table, int start, int end)
 
void mthca_table_put_range (struct mthca_dev *dev, struct mthca_icm_table *table, int start, int end)
 
struct mthca_icm_tablemthca_alloc_icm_table (struct mthca_dev *dev, u64 virt, int obj_size, int nobj, int reserved, int use_lowmem, int use_coherent)
 
void mthca_free_icm_table (struct mthca_dev *dev, struct mthca_icm_table *table)
 
int mthca_map_user_db (struct mthca_dev *dev, struct mthca_uar *uar, struct mthca_user_db_table *db_tab, int index, u64 uaddr)
 
void mthca_unmap_user_db (struct mthca_dev *dev, struct mthca_uar *uar, struct mthca_user_db_table *db_tab, int index)
 
struct mthca_user_db_tablemthca_init_user_db_tab (struct mthca_dev *dev)
 
void mthca_cleanup_user_db_tab (struct mthca_dev *dev, struct mthca_uar *uar, struct mthca_user_db_table *db_tab)
 
int mthca_alloc_db (struct mthca_dev *dev, enum mthca_db_type type, u32 qn, __be32 **db)
 
void mthca_free_db (struct mthca_dev *dev, int type, int db_index)
 
int mthca_init_db_tab (struct mthca_dev *dev)
 
void mthca_cleanup_db_tab (struct mthca_dev *dev)
 

Enumeration Type Documentation

anonymous enum
Enumerator:
MTHCA_ICM_ALLOC_SIZE 
MTHCA_TABLE_CHUNK_SIZE 

Definition at line 50 of file mthca_memfree.c.

Function Documentation

int mthca_alloc_db ( struct mthca_dev dev,
enum mthca_db_type  type,
u32  qn,
__be32 **  db 
)

Definition at line 566 of file mthca_memfree.c.

struct mthca_icm* mthca_alloc_icm ( struct mthca_dev dev,
int  npages,
gfp_t  gfp_mask,
int  coherent 
)
read

Definition at line 137 of file mthca_memfree.c.

struct mthca_icm_table* mthca_alloc_icm_table ( struct mthca_dev dev,
u64  virt,
int  obj_size,
int  nobj,
int  reserved,
int  use_lowmem,
int  use_coherent 
)
read

Definition at line 356 of file mthca_memfree.c.

void mthca_cleanup_db_tab ( struct mthca_dev dev)

Definition at line 731 of file mthca_memfree.c.

void mthca_cleanup_user_db_tab ( struct mthca_dev dev,
struct mthca_uar uar,
struct mthca_user_db_table db_tab 
)

Definition at line 547 of file mthca_memfree.c.

void mthca_free_db ( struct mthca_dev dev,
int  type,
int  db_index 
)

Definition at line 664 of file mthca_memfree.c.

void mthca_free_icm ( struct mthca_dev dev,
struct mthca_icm icm,
int  coherent 
)

Definition at line 88 of file mthca_memfree.c.

void mthca_free_icm_table ( struct mthca_dev dev,
struct mthca_icm_table table 
)

Definition at line 424 of file mthca_memfree.c.

int mthca_init_db_tab ( struct mthca_dev dev)

Definition at line 700 of file mthca_memfree.c.

struct mthca_user_db_table* mthca_init_user_db_tab ( struct mthca_dev dev)
read

Definition at line 523 of file mthca_memfree.c.

int mthca_map_user_db ( struct mthca_dev dev,
struct mthca_uar uar,
struct mthca_user_db_table db_tab,
int  index,
u64  uaddr 
)

Definition at line 446 of file mthca_memfree.c.

void* mthca_table_find ( struct mthca_icm_table table,
int  obj,
dma_addr_t dma_handle 
)

Definition at line 278 of file mthca_memfree.c.

int mthca_table_get ( struct mthca_dev dev,
struct mthca_icm_table table,
int  obj 
)

Definition at line 222 of file mthca_memfree.c.

int mthca_table_get_range ( struct mthca_dev dev,
struct mthca_icm_table table,
int  start,
int  end 
)

Definition at line 321 of file mthca_memfree.c.

void mthca_table_put ( struct mthca_dev dev,
struct mthca_icm_table table,
int  obj 
)

Definition at line 257 of file mthca_memfree.c.

void mthca_table_put_range ( struct mthca_dev dev,
struct mthca_icm_table table,
int  start,
int  end 
)

Definition at line 344 of file mthca_memfree.c.

void mthca_unmap_user_db ( struct mthca_dev dev,
struct mthca_uar uar,
struct mthca_user_db_table db_tab,
int  index 
)

Definition at line 505 of file mthca_memfree.c.