Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
mr.c File Reference
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/export.h>
#include <linux/slab.h>
#include <linux/kernel.h>
#include <linux/vmalloc.h>
#include <linux/mlx4/cmd.h>
#include "mlx4.h"
#include "icm.h"

Go to the source code of this file.

Macros

#define MLX4_MPT_FLAG_SW_OWNS   (0xfUL << 28)
 
#define MLX4_MPT_FLAG_FREE   (0x3UL << 28)
 
#define MLX4_MPT_FLAG_MIO   (1 << 17)
 
#define MLX4_MPT_FLAG_BIND_ENABLE   (1 << 15)
 
#define MLX4_MPT_FLAG_PHYSICAL   (1 << 9)
 
#define MLX4_MPT_FLAG_REGION   (1 << 8)
 
#define MLX4_MPT_PD_FLAG_FAST_REG   (1 << 27)
 
#define MLX4_MPT_PD_FLAG_RAE   (1 << 28)
 
#define MLX4_MPT_PD_FLAG_EN_INV   (3 << 24)
 
#define MLX4_MPT_STATUS_SW   0xF0
 
#define MLX4_MPT_STATUS_HW   0x00
 

Functions

u32 __mlx4_alloc_mtt_range (struct mlx4_dev *dev, int order)
 
int mlx4_mtt_init (struct mlx4_dev *dev, int npages, int page_shift, struct mlx4_mtt *mtt)
 
 EXPORT_SYMBOL_GPL (mlx4_mtt_init)
 
void __mlx4_free_mtt_range (struct mlx4_dev *dev, u32 offset, int order)
 
void mlx4_mtt_cleanup (struct mlx4_dev *dev, struct mlx4_mtt *mtt)
 
 EXPORT_SYMBOL_GPL (mlx4_mtt_cleanup)
 
u64 mlx4_mtt_addr (struct mlx4_dev *dev, struct mlx4_mtt *mtt)
 
 EXPORT_SYMBOL_GPL (mlx4_mtt_addr)
 
int __mlx4_mr_reserve (struct mlx4_dev *dev)
 
void __mlx4_mr_release (struct mlx4_dev *dev, u32 index)
 
int __mlx4_mr_alloc_icm (struct mlx4_dev *dev, u32 index)
 
void __mlx4_mr_free_icm (struct mlx4_dev *dev, u32 index)
 
int mlx4_mr_alloc (struct mlx4_dev *dev, u32 pd, u64 iova, u64 size, u32 access, int npages, int page_shift, struct mlx4_mr *mr)
 
 EXPORT_SYMBOL_GPL (mlx4_mr_alloc)
 
void mlx4_mr_free (struct mlx4_dev *dev, struct mlx4_mr *mr)
 
 EXPORT_SYMBOL_GPL (mlx4_mr_free)
 
int mlx4_mr_enable (struct mlx4_dev *dev, struct mlx4_mr *mr)
 
 EXPORT_SYMBOL_GPL (mlx4_mr_enable)
 
int __mlx4_write_mtt (struct mlx4_dev *dev, struct mlx4_mtt *mtt, int start_index, int npages, u64 *page_list)
 
int mlx4_write_mtt (struct mlx4_dev *dev, struct mlx4_mtt *mtt, int start_index, int npages, u64 *page_list)
 
 EXPORT_SYMBOL_GPL (mlx4_write_mtt)
 
int mlx4_buf_write_mtt (struct mlx4_dev *dev, struct mlx4_mtt *mtt, struct mlx4_buf *buf)
 
 EXPORT_SYMBOL_GPL (mlx4_buf_write_mtt)
 
int mlx4_init_mr_table (struct mlx4_dev *dev)
 
void mlx4_cleanup_mr_table (struct mlx4_dev *dev)
 
int mlx4_map_phys_fmr (struct mlx4_dev *dev, struct mlx4_fmr *fmr, u64 *page_list, int npages, u64 iova, u32 *lkey, u32 *rkey)
 
 EXPORT_SYMBOL_GPL (mlx4_map_phys_fmr)
 
int mlx4_fmr_alloc (struct mlx4_dev *dev, u32 pd, u32 access, int max_pages, int max_maps, u8 page_shift, struct mlx4_fmr *fmr)
 
 EXPORT_SYMBOL_GPL (mlx4_fmr_alloc)
 
int mlx4_fmr_enable (struct mlx4_dev *dev, struct mlx4_fmr *fmr)
 
 EXPORT_SYMBOL_GPL (mlx4_fmr_enable)
 
void mlx4_fmr_unmap (struct mlx4_dev *dev, struct mlx4_fmr *fmr, u32 *lkey, u32 *rkey)
 
 EXPORT_SYMBOL_GPL (mlx4_fmr_unmap)
 
int mlx4_fmr_free (struct mlx4_dev *dev, struct mlx4_fmr *fmr)
 
 EXPORT_SYMBOL_GPL (mlx4_fmr_free)
 
int mlx4_SYNC_TPT (struct mlx4_dev *dev)
 
 EXPORT_SYMBOL_GPL (mlx4_SYNC_TPT)
 

Macro Definition Documentation

#define MLX4_MPT_FLAG_BIND_ENABLE   (1 << 15)

Definition at line 50 of file mr.c.

#define MLX4_MPT_FLAG_FREE   (0x3UL << 28)

Definition at line 48 of file mr.c.

#define MLX4_MPT_FLAG_MIO   (1 << 17)

Definition at line 49 of file mr.c.

#define MLX4_MPT_FLAG_PHYSICAL   (1 << 9)

Definition at line 51 of file mr.c.

#define MLX4_MPT_FLAG_REGION   (1 << 8)

Definition at line 52 of file mr.c.

#define MLX4_MPT_FLAG_SW_OWNS   (0xfUL << 28)

Definition at line 47 of file mr.c.

#define MLX4_MPT_PD_FLAG_EN_INV   (3 << 24)

Definition at line 56 of file mr.c.

#define MLX4_MPT_PD_FLAG_FAST_REG   (1 << 27)

Definition at line 54 of file mr.c.

#define MLX4_MPT_PD_FLAG_RAE   (1 << 28)

Definition at line 55 of file mr.c.

#define MLX4_MPT_STATUS_HW   0x00

Definition at line 59 of file mr.c.

#define MLX4_MPT_STATUS_SW   0xF0

Definition at line 58 of file mr.c.

Function Documentation

u32 __mlx4_alloc_mtt_range ( struct mlx4_dev dev,
int  order 
)

Definition at line 174 of file mr.c.

void __mlx4_free_mtt_range ( struct mlx4_dev dev,
u32  offset,
int  order 
)

Definition at line 241 of file mr.c.

int __mlx4_mr_alloc_icm ( struct mlx4_dev dev,
u32  index 
)

Definition at line 382 of file mr.c.

void __mlx4_mr_free_icm ( struct mlx4_dev dev,
u32  index 
)

Definition at line 403 of file mr.c.

void __mlx4_mr_release ( struct mlx4_dev dev,
u32  index 
)

Definition at line 359 of file mr.c.

int __mlx4_mr_reserve ( struct mlx4_dev dev)

Definition at line 338 of file mr.c.

int __mlx4_write_mtt ( struct mlx4_dev dev,
struct mlx4_mtt mtt,
int  start_index,
int  npages,
u64 page_list 
)

Definition at line 564 of file mr.c.

EXPORT_SYMBOL_GPL ( mlx4_mtt_init  )
EXPORT_SYMBOL_GPL ( mlx4_mtt_cleanup  )
EXPORT_SYMBOL_GPL ( mlx4_mtt_addr  )
EXPORT_SYMBOL_GPL ( mlx4_mr_alloc  )
EXPORT_SYMBOL_GPL ( mlx4_mr_free  )
EXPORT_SYMBOL_GPL ( mlx4_mr_enable  )
EXPORT_SYMBOL_GPL ( mlx4_write_mtt  )
EXPORT_SYMBOL_GPL ( mlx4_buf_write_mtt  )
EXPORT_SYMBOL_GPL ( mlx4_map_phys_fmr  )
EXPORT_SYMBOL_GPL ( mlx4_fmr_alloc  )
EXPORT_SYMBOL_GPL ( mlx4_fmr_enable  )
EXPORT_SYMBOL_GPL ( mlx4_fmr_unmap  )
EXPORT_SYMBOL_GPL ( mlx4_fmr_free  )
EXPORT_SYMBOL_GPL ( mlx4_SYNC_TPT  )
int mlx4_buf_write_mtt ( struct mlx4_dev dev,
struct mlx4_mtt mtt,
struct mlx4_buf buf 
)

Definition at line 636 of file mr.c.

void mlx4_cleanup_mr_table ( struct mlx4_dev dev)

Definition at line 708 of file mr.c.

int mlx4_fmr_alloc ( struct mlx4_dev dev,
u32  pd,
u32  access,
int  max_pages,
int  max_maps,
u8  page_shift,
struct mlx4_fmr fmr 
)

Definition at line 796 of file mr.c.

int mlx4_fmr_enable ( struct mlx4_dev dev,
struct mlx4_fmr fmr 
)

Definition at line 839 of file mr.c.

int mlx4_fmr_free ( struct mlx4_dev dev,
struct mlx4_fmr fmr 
)

Definition at line 889 of file mr.c.

void mlx4_fmr_unmap ( struct mlx4_dev dev,
struct mlx4_fmr fmr,
u32 lkey,
u32 rkey 
)

Definition at line 857 of file mr.c.

int mlx4_init_mr_table ( struct mlx4_dev dev)

Definition at line 660 of file mr.c.

int mlx4_map_phys_fmr ( struct mlx4_dev dev,
struct mlx4_fmr fmr,
u64 page_list,
int  npages,
u64  iova,
u32 lkey,
u32 rkey 
)

Definition at line 749 of file mr.c.

int mlx4_mr_alloc ( struct mlx4_dev dev,
u32  pd,
u64  iova,
u64  size,
u32  access,
int  npages,
int  page_shift,
struct mlx4_mr mr 
)

Definition at line 426 of file mr.c.

int mlx4_mr_enable ( struct mlx4_dev dev,
struct mlx4_mr mr 
)

Definition at line 470 of file mr.c.

void mlx4_mr_free ( struct mlx4_dev dev,
struct mlx4_mr mr 
)

Definition at line 461 of file mr.c.

u64 mlx4_mtt_addr ( struct mlx4_dev dev,
struct mlx4_mtt mtt 
)

Definition at line 284 of file mr.c.

void mlx4_mtt_cleanup ( struct mlx4_dev dev,
struct mlx4_mtt mtt 
)

Definition at line 275 of file mr.c.

int mlx4_mtt_init ( struct mlx4_dev dev,
int  npages,
int  page_shift,
struct mlx4_mtt mtt 
)

Definition at line 218 of file mr.c.

int mlx4_SYNC_TPT ( struct mlx4_dev dev)

Definition at line 901 of file mr.c.

int mlx4_write_mtt ( struct mlx4_dev dev,
struct mlx4_mtt mtt,
int  start_index,
int  npages,
u64 page_list 
)

Definition at line 592 of file mr.c.