|
@@ -107,7 +107,7 @@ void rxe_mem_cleanup(struct rxe_pool_entry *arg)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-static int rxe_mem_alloc(struct rxe_dev *rxe, struct rxe_mem *mem, int num_buf)
|
|
|
|
|
|
+static int rxe_mem_alloc(struct rxe_mem *mem, int num_buf)
|
|
{
|
|
{
|
|
int i;
|
|
int i;
|
|
int num_map;
|
|
int num_map;
|
|
@@ -145,7 +145,7 @@ err1:
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
}
|
|
}
|
|
|
|
|
|
-int rxe_mem_init_dma(struct rxe_dev *rxe, struct rxe_pd *pd,
|
|
|
|
|
|
+int rxe_mem_init_dma(struct rxe_pd *pd,
|
|
int access, struct rxe_mem *mem)
|
|
int access, struct rxe_mem *mem)
|
|
{
|
|
{
|
|
rxe_mem_init(access, mem);
|
|
rxe_mem_init(access, mem);
|
|
@@ -158,7 +158,7 @@ int rxe_mem_init_dma(struct rxe_dev *rxe, struct rxe_pd *pd,
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
-int rxe_mem_init_user(struct rxe_dev *rxe, struct rxe_pd *pd, u64 start,
|
|
|
|
|
|
+int rxe_mem_init_user(struct rxe_pd *pd, u64 start,
|
|
u64 length, u64 iova, int access, struct ib_udata *udata,
|
|
u64 length, u64 iova, int access, struct ib_udata *udata,
|
|
struct rxe_mem *mem)
|
|
struct rxe_mem *mem)
|
|
{
|
|
{
|
|
@@ -184,7 +184,7 @@ int rxe_mem_init_user(struct rxe_dev *rxe, struct rxe_pd *pd, u64 start,
|
|
|
|
|
|
rxe_mem_init(access, mem);
|
|
rxe_mem_init(access, mem);
|
|
|
|
|
|
- err = rxe_mem_alloc(rxe, mem, num_buf);
|
|
|
|
|
|
+ err = rxe_mem_alloc(mem, num_buf);
|
|
if (err) {
|
|
if (err) {
|
|
pr_warn("err %d from rxe_mem_alloc\n", err);
|
|
pr_warn("err %d from rxe_mem_alloc\n", err);
|
|
ib_umem_release(umem);
|
|
ib_umem_release(umem);
|
|
@@ -236,7 +236,7 @@ err1:
|
|
return err;
|
|
return err;
|
|
}
|
|
}
|
|
|
|
|
|
-int rxe_mem_init_fast(struct rxe_dev *rxe, struct rxe_pd *pd,
|
|
|
|
|
|
+int rxe_mem_init_fast(struct rxe_pd *pd,
|
|
int max_pages, struct rxe_mem *mem)
|
|
int max_pages, struct rxe_mem *mem)
|
|
{
|
|
{
|
|
int err;
|
|
int err;
|
|
@@ -246,7 +246,7 @@ int rxe_mem_init_fast(struct rxe_dev *rxe, struct rxe_pd *pd,
|
|
/* In fastreg, we also set the rkey */
|
|
/* In fastreg, we also set the rkey */
|
|
mem->ibmr.rkey = mem->ibmr.lkey;
|
|
mem->ibmr.rkey = mem->ibmr.lkey;
|
|
|
|
|
|
- err = rxe_mem_alloc(rxe, mem, max_pages);
|
|
|
|
|
|
+ err = rxe_mem_alloc(mem, max_pages);
|
|
if (err)
|
|
if (err)
|
|
goto err1;
|
|
goto err1;
|
|
|
|
|
|
@@ -434,7 +434,6 @@ err1:
|
|
* under the control of a dma descriptor
|
|
* under the control of a dma descriptor
|
|
*/
|
|
*/
|
|
int copy_data(
|
|
int copy_data(
|
|
- struct rxe_dev *rxe,
|
|
|
|
struct rxe_pd *pd,
|
|
struct rxe_pd *pd,
|
|
int access,
|
|
int access,
|
|
struct rxe_dma_info *dma,
|
|
struct rxe_dma_info *dma,
|