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

Go to the source code of this file.

Data Structures

struct  mthca_mtt
 
struct  mthca_mpt_entry
 

Macros

#define MTHCA_MPT_FLAG_SW_OWNS   (0xfUL << 28)
 
#define MTHCA_MPT_FLAG_MIO   (1 << 17)
 
#define MTHCA_MPT_FLAG_BIND_ENABLE   (1 << 15)
 
#define MTHCA_MPT_FLAG_PHYSICAL   (1 << 9)
 
#define MTHCA_MPT_FLAG_REGION   (1 << 8)
 
#define MTHCA_MTT_FLAG_PRESENT   1
 
#define MTHCA_MPT_STATUS_SW   0xF0
 
#define MTHCA_MPT_STATUS_HW   0x00
 
#define SINAI_FMR_KEY_INC   0x1000000
 

Functions

struct mthca_mpt_entry __attribute__ ((packed))
 
struct mthca_mttmthca_alloc_mtt (struct mthca_dev *dev, int size)
 
void mthca_free_mtt (struct mthca_dev *dev, struct mthca_mtt *mtt)
 
int mthca_write_mtt_size (struct mthca_dev *dev)
 
int mthca_write_mtt (struct mthca_dev *dev, struct mthca_mtt *mtt, int start_index, u64 *buffer_list, int list_len)
 
int mthca_mr_alloc (struct mthca_dev *dev, u32 pd, int buffer_size_shift, u64 iova, u64 total_size, u32 access, struct mthca_mr *mr)
 
int mthca_mr_alloc_notrans (struct mthca_dev *dev, u32 pd, u32 access, struct mthca_mr *mr)
 
int mthca_mr_alloc_phys (struct mthca_dev *dev, u32 pd, u64 *buffer_list, int buffer_size_shift, int list_len, u64 iova, u64 total_size, u32 access, struct mthca_mr *mr)
 
void mthca_free_mr (struct mthca_dev *dev, struct mthca_mr *mr)
 
int mthca_fmr_alloc (struct mthca_dev *dev, u32 pd, u32 access, struct mthca_fmr *mr)
 
int mthca_free_fmr (struct mthca_dev *dev, struct mthca_fmr *fmr)
 
int mthca_tavor_map_phys_fmr (struct ib_fmr *ibfmr, u64 *page_list, int list_len, u64 iova)
 
int mthca_arbel_map_phys_fmr (struct ib_fmr *ibfmr, u64 *page_list, int list_len, u64 iova)
 
void mthca_tavor_fmr_unmap (struct mthca_dev *dev, struct mthca_fmr *fmr)
 
void mthca_arbel_fmr_unmap (struct mthca_dev *dev, struct mthca_fmr *fmr)
 
int mthca_init_mr_table (struct mthca_dev *dev)
 
void mthca_cleanup_mr_table (struct mthca_dev *dev)
 

Variables

__be32 flags
 
__be32 page_size
 
__be32 key
 
__be32 pd
 
__be64 start
 
__be64 length
 
__be32 lkey
 
__be32 window_count
 
__be32 window_count_limit
 
__be64 mtt_seg
 
__be32 mtt_sz
 
u32 reserved [2]
 

Macro Definition Documentation

#define MTHCA_MPT_FLAG_BIND_ENABLE   (1 << 15)

Definition at line 67 of file mthca_mr.c.

#define MTHCA_MPT_FLAG_MIO   (1 << 17)

Definition at line 66 of file mthca_mr.c.

#define MTHCA_MPT_FLAG_PHYSICAL   (1 << 9)

Definition at line 68 of file mthca_mr.c.

#define MTHCA_MPT_FLAG_REGION   (1 << 8)

Definition at line 69 of file mthca_mr.c.

#define MTHCA_MPT_FLAG_SW_OWNS   (0xfUL << 28)

Definition at line 65 of file mthca_mr.c.

#define MTHCA_MPT_STATUS_HW   0x00

Definition at line 74 of file mthca_mr.c.

#define MTHCA_MPT_STATUS_SW   0xF0

Definition at line 73 of file mthca_mr.c.

#define MTHCA_MTT_FLAG_PRESENT   1

Definition at line 71 of file mthca_mr.c.

#define SINAI_FMR_KEY_INC   0x1000000

Definition at line 76 of file mthca_mr.c.

Function Documentation

struct mthca_mpt_entry __attribute__ ( (packed)  )
read

Definition at line 171 of file esd_usb2.c.

struct mthca_mtt* mthca_alloc_mtt ( struct mthca_dev dev,
int  size 
)
read

Definition at line 235 of file mthca_mr.c.

void mthca_arbel_fmr_unmap ( struct mthca_dev dev,
struct mthca_fmr fmr 
)

Definition at line 817 of file mthca_mr.c.

int mthca_arbel_map_phys_fmr ( struct ib_fmr ibfmr,
u64 page_list,
int  list_len,
u64  iova 
)

Definition at line 758 of file mthca_mr.c.

void mthca_cleanup_mr_table ( struct mthca_dev dev)

Definition at line 951 of file mthca_mr.c.

int mthca_fmr_alloc ( struct mthca_dev dev,
u32  pd,
u32  access,
struct mthca_fmr mr 
)

Definition at line 567 of file mthca_mr.c.

int mthca_free_fmr ( struct mthca_dev dev,
struct mthca_fmr fmr 
)

Definition at line 678 of file mthca_mr.c.

void mthca_free_mr ( struct mthca_dev dev,
struct mthca_mr mr 
)

Definition at line 553 of file mthca_mr.c.

void mthca_free_mtt ( struct mthca_dev dev,
struct mthca_mtt mtt 
)

Definition at line 240 of file mthca_mr.c.

int mthca_init_mr_table ( struct mthca_dev dev)

Definition at line 827 of file mthca_mr.c.

int mthca_mr_alloc ( struct mthca_dev dev,
u32  pd,
int  buffer_size_shift,
u64  iova,
u64  total_size,
u32  access,
struct mthca_mr mr 
)

Definition at line 429 of file mthca_mr.c.

int mthca_mr_alloc_notrans ( struct mthca_dev dev,
u32  pd,
u32  access,
struct mthca_mr mr 
)

Definition at line 512 of file mthca_mr.c.

int mthca_mr_alloc_phys ( struct mthca_dev dev,
u32  pd,
u64 buffer_list,
int  buffer_size_shift,
int  list_len,
u64  iova,
u64  total_size,
u32  access,
struct mthca_mr mr 
)

Definition at line 519 of file mthca_mr.c.

void mthca_tavor_fmr_unmap ( struct mthca_dev dev,
struct mthca_fmr fmr 
)

Definition at line 807 of file mthca_mr.c.

int mthca_tavor_map_phys_fmr ( struct ib_fmr ibfmr,
u64 page_list,
int  list_len,
u64  iova 
)

Definition at line 717 of file mthca_mr.c.

int mthca_write_mtt ( struct mthca_dev dev,
struct mthca_mtt mtt,
int  start_index,
u64 buffer_list,
int  list_len 
)

Definition at line 358 of file mthca_mr.c.

int mthca_write_mtt_size ( struct mthca_dev dev)

Definition at line 299 of file mthca_mr.c.

Variable Documentation

__be32 flags

Definition at line 64 of file mthca_mr.c.

__be32 key

Definition at line 66 of file mthca_mr.c.

__be64 length

Definition at line 69 of file mthca_mr.c.

__be32 lkey

Definition at line 70 of file mthca_mr.c.

__be64 mtt_seg

Definition at line 73 of file mthca_mr.c.

__be32 mtt_sz

Definition at line 74 of file mthca_mr.c.

__be32 page_size

Definition at line 65 of file mthca_mr.c.

__be32 pd

Definition at line 67 of file mthca_mr.c.

u32 reserved[2]

Definition at line 75 of file mthca_mr.c.

__be64 start

Definition at line 68 of file mthca_mr.c.

__be32 window_count

Definition at line 71 of file mthca_mr.c.

__be32 window_count_limit

Definition at line 72 of file mthca_mr.c.