/Linux-v4.19/drivers/infiniband/hw/mthca/ |
D | mthca_mr.c | 211 struct mthca_mtt *mtt; in __mthca_alloc_mtt() local 217 mtt = kmalloc(sizeof *mtt, GFP_KERNEL); in __mthca_alloc_mtt() 218 if (!mtt) in __mthca_alloc_mtt() 221 mtt->buddy = buddy; in __mthca_alloc_mtt() 222 mtt->order = 0; in __mthca_alloc_mtt() 224 ++mtt->order; in __mthca_alloc_mtt() 226 mtt->first_seg = mthca_alloc_mtt_range(dev, mtt->order, buddy); in __mthca_alloc_mtt() 227 if (mtt->first_seg == -1) { in __mthca_alloc_mtt() 228 kfree(mtt); in __mthca_alloc_mtt() 232 return mtt; in __mthca_alloc_mtt() [all …]
|
D | mthca_provider.h | 76 struct mthca_mtt *mtt; member 82 struct mthca_mtt *mtt; member
|
D | mthca_provider.c | 944 mr->mtt = mthca_alloc_mtt(dev, n); in mthca_reg_user_mr() 945 if (IS_ERR(mr->mtt)) { in mthca_reg_user_mr() 946 err = PTR_ERR(mr->mtt); in mthca_reg_user_mr() 969 err = mthca_write_mtt(dev, mr->mtt, n, pages, i); in mthca_reg_user_mr() 979 err = mthca_write_mtt(dev, mr->mtt, n, pages, i); in mthca_reg_user_mr() 994 mthca_free_mtt(dev, mr->mtt); in mthca_reg_user_mr()
|
D | mthca_dev.h | 468 void mthca_free_mtt(struct mthca_dev *dev, struct mthca_mtt *mtt); 469 int mthca_write_mtt(struct mthca_dev *dev, struct mthca_mtt *mtt,
|
/Linux-v4.19/drivers/net/ethernet/mellanox/mlx4/ |
D | mr.c | 195 struct mlx4_mtt *mtt) in mlx4_mtt_init() argument 200 mtt->order = -1; in mlx4_mtt_init() 201 mtt->page_shift = MLX4_ICM_PAGE_SHIFT; in mlx4_mtt_init() 204 mtt->page_shift = page_shift; in mlx4_mtt_init() 206 for (mtt->order = 0, i = 1; i < npages; i <<= 1) in mlx4_mtt_init() 207 ++mtt->order; in mlx4_mtt_init() 209 mtt->offset = mlx4_alloc_mtt_range(dev, mtt->order); in mlx4_mtt_init() 210 if (mtt->offset == -1) in mlx4_mtt_init() 251 void mlx4_mtt_cleanup(struct mlx4_dev *dev, struct mlx4_mtt *mtt) in mlx4_mtt_cleanup() argument 253 if (mtt->order < 0) in mlx4_mtt_cleanup() [all …]
|
D | resource_tracker.c | 110 struct res_mtt *mtt; member 158 struct res_mtt *mtt; member 170 struct res_mtt *mtt; member 181 struct res_mtt *mtt; member 193 struct res_mtt *mtt; member 456 dev->quotas.mtt = dev->caps.num_mtts - dev->caps.reserved_mtts; in mlx4_init_quotas() 468 dev->quotas.mtt = in mlx4_init_quotas() 2734 int size, struct res_mtt *mtt) in check_mtt_range() argument 2736 int res_start = mtt->com.res_id; in check_mtt_range() 2737 int res_size = (1 << mtt->order); in check_mtt_range() [all …]
|
D | cq.c | 192 int entries, struct mlx4_mtt *mtt) in mlx4_cq_resize() argument 205 cq_context->log_page_size = mtt->page_shift - 12; in mlx4_cq_resize() 206 mtt_addr = mlx4_mtt_addr(dev, mtt); in mlx4_cq_resize() 291 struct mlx4_mtt *mtt, struct mlx4_uar *uar, u64 db_rec, in mlx4_cq_alloc() argument 332 cq_context->log_page_size = mtt->page_shift - MLX4_ICM_PAGE_SHIFT; in mlx4_cq_alloc() 334 mtt_addr = mlx4_mtt_addr(dev, mtt); in mlx4_cq_alloc()
|
D | srq.c | 163 struct mlx4_mtt *mtt, u64 db_rec, struct mlx4_srq *srq) in mlx4_srq_alloc() argument 193 srq_context->log_page_size = mtt->page_shift - MLX4_ICM_PAGE_SHIFT; in mlx4_srq_alloc() 195 mtt_addr = mlx4_mtt_addr(dev, mtt); in mlx4_srq_alloc()
|
D | qp.c | 87 static int __mlx4_qp_modify(struct mlx4_dev *dev, struct mlx4_mtt *mtt, in __mlx4_qp_modify() argument 164 u64 mtt_addr = mlx4_mtt_addr(dev, mtt); in __mlx4_qp_modify() 167 context->log_page_size = mtt->page_shift - MLX4_ICM_PAGE_SHIFT; in __mlx4_qp_modify() 208 int mlx4_qp_modify(struct mlx4_dev *dev, struct mlx4_mtt *mtt, in mlx4_qp_modify() argument 214 return __mlx4_qp_modify(dev, mtt, cur_state, new_state, context, in mlx4_qp_modify() 914 int mlx4_qp_to_ready(struct mlx4_dev *dev, struct mlx4_mtt *mtt, in mlx4_qp_to_ready() argument 932 err = mlx4_qp_modify(dev, mtt, states[i], states[i + 1], in mlx4_qp_to_ready()
|
D | alloc.c | 791 &wqres->mtt); in mlx4_alloc_hwq_res() 795 err = mlx4_buf_write_mtt(dev, &wqres->mtt, &wqres->buf); in mlx4_alloc_hwq_res() 802 mlx4_mtt_cleanup(dev, &wqres->mtt); in mlx4_alloc_hwq_res() 815 mlx4_mtt_cleanup(dev, &wqres->mtt); in mlx4_free_hwq_res()
|
D | en_cq.c | 144 err = mlx4_cq_alloc(mdev->dev, cq->size, &cq->wqres.mtt, in mlx4_en_activate_cq()
|
D | eq.c | 1029 err = mlx4_mtt_init(dev, npages, PAGE_SHIFT, &eq->mtt); in mlx4_create_eq() 1033 err = mlx4_write_mtt(dev, &eq->mtt, 0, npages, dma_list); in mlx4_create_eq() 1043 mtt_addr = mlx4_mtt_addr(dev, &eq->mtt); in mlx4_create_eq() 1067 mlx4_mtt_cleanup(dev, &eq->mtt); in mlx4_create_eq() 1107 mlx4_mtt_cleanup(dev, &eq->mtt); in mlx4_free_eq()
|
/Linux-v4.19/drivers/infiniband/hw/hns/ |
D | hns_roce_mr.c | 209 struct hns_roce_mtt *mtt) in hns_roce_mtt_init() argument 216 mtt->order = -1; in hns_roce_mtt_init() 217 mtt->page_shift = HNS_ROCE_HEM_PAGE_SHIFT; in hns_roce_mtt_init() 222 mtt->page_shift = page_shift; in hns_roce_mtt_init() 225 for (mtt->order = 0, i = HNS_ROCE_MTT_ENTRY_PER_SEG; i < npages; in hns_roce_mtt_init() 227 ++mtt->order; in hns_roce_mtt_init() 230 ret = hns_roce_alloc_mtt_range(hr_dev, mtt->order, &mtt->first_seg, in hns_roce_mtt_init() 231 mtt->mtt_type); in hns_roce_mtt_init() 238 void hns_roce_mtt_cleanup(struct hns_roce_dev *hr_dev, struct hns_roce_mtt *mtt) in hns_roce_mtt_cleanup() argument 242 if (mtt->order < 0) in hns_roce_mtt_cleanup() [all …]
|
D | hns_roce_qp.c | 600 hr_qp->mtt.mtt_type = MTT_TYPE_WQE; in hns_roce_create_qp_common() 608 &hr_qp->mtt); in hns_roce_create_qp_common() 613 &hr_qp->mtt); in hns_roce_create_qp_common() 620 ret = hns_roce_ib_umem_write_mtt(hr_dev, &hr_qp->mtt, in hns_roce_create_qp_common() 704 hr_qp->mtt.mtt_type = MTT_TYPE_WQE; in hns_roce_create_qp_common() 707 hr_qp->hr_buf.page_shift, &hr_qp->mtt); in hns_roce_create_qp_common() 713 ret = hns_roce_buf_write_mtt(hr_dev, &hr_qp->mtt, in hns_roce_create_qp_common() 812 hns_roce_mtt_cleanup(hr_dev, &hr_qp->mtt); in hns_roce_create_qp_common()
|
D | hns_roce_device.h | 541 struct hns_roce_mtt mtt; member 922 struct hns_roce_mtt *mtt); 924 struct hns_roce_mtt *mtt); 926 struct hns_roce_mtt *mtt, struct hns_roce_buf *buf); 983 struct hns_roce_mtt *mtt, struct ib_umem *umem);
|
/Linux-v4.19/drivers/infiniband/hw/mlx4/ |
D | srq.c | 124 srq->umem->page_shift, &srq->mtt); in mlx4_ib_create_srq() 128 err = mlx4_ib_umem_write_mtt(dev, &srq->mtt, srq->umem); in mlx4_ib_create_srq() 165 &srq->mtt); in mlx4_ib_create_srq() 169 err = mlx4_buf_write_mtt(dev->dev, &srq->mtt, &srq->buf); in mlx4_ib_create_srq() 186 err = mlx4_srq_alloc(dev->dev, to_mpd(pd)->pdn, cqn, xrcdn, &srq->mtt, in mlx4_ib_create_srq() 211 mlx4_mtt_cleanup(dev->dev, &srq->mtt); in mlx4_ib_create_srq() 279 mlx4_mtt_cleanup(dev->dev, &msrq->mtt); in mlx4_ib_destroy_srq()
|
D | cq.c | 112 &buf->mtt); in mlx4_ib_alloc_cq_buf() 116 err = mlx4_buf_write_mtt(dev->dev, &buf->mtt, &buf->buf); in mlx4_ib_alloc_cq_buf() 123 mlx4_mtt_cleanup(dev->dev, &buf->mtt); in mlx4_ib_alloc_cq_buf() 153 err = mlx4_mtt_init(dev->dev, n, shift, &buf->mtt); in mlx4_ib_get_cq_umem() 158 err = mlx4_ib_umem_write_mtt(dev, &buf->mtt, *umem); in mlx4_ib_get_cq_umem() 165 mlx4_mtt_cleanup(dev->dev, &buf->mtt); in mlx4_ib_get_cq_umem() 247 err = mlx4_cq_alloc(dev->dev, entries, &cq->buf.mtt, uar, in mlx4_ib_create_cq() 275 mlx4_mtt_cleanup(dev->dev, &cq->buf.mtt); in mlx4_ib_create_cq() 385 struct mlx4_mtt mtt; in mlx4_ib_resize_cq() local 423 mtt = cq->buf.mtt; in mlx4_ib_resize_cq() [all …]
|
D | mr.c | 95 struct mlx4_mtt *mtt, in mlx4_ib_umem_write_mtt_block() argument 134 err = mlx4_write_mtt(dev->dev, mtt, *start_index, in mlx4_ib_umem_write_mtt_block() 182 int mlx4_ib_umem_write_mtt(struct mlx4_ib_dev *dev, struct mlx4_mtt *mtt, in mlx4_ib_umem_write_mtt() argument 200 mtt_shift = mtt->page_shift; in mlx4_ib_umem_write_mtt() 214 err = mlx4_ib_umem_write_mtt_block(dev, mtt, mtt_size, in mlx4_ib_umem_write_mtt() 232 err = mlx4_ib_umem_write_mtt_block(dev, mtt, mtt_size, in mlx4_ib_umem_write_mtt() 241 err = mlx4_write_mtt(dev->dev, mtt, start_index, npages, pages); in mlx4_ib_umem_write_mtt() 433 err = mlx4_ib_umem_write_mtt(dev, &mr->mmr.mtt, mr->umem); in mlx4_ib_reg_user_mr() 530 err = mlx4_ib_umem_write_mtt(dev, &mmr->mmr.mtt, mmr->umem); in mlx4_ib_rereg_user_mr()
|
D | mlx4_ib.h | 111 struct mlx4_mtt mtt; member 330 struct mlx4_mtt mtt; member 370 struct mlx4_mtt mtt; member 734 int mlx4_ib_umem_write_mtt(struct mlx4_ib_dev *dev, struct mlx4_mtt *mtt,
|
/Linux-v4.19/drivers/infiniband/hw/mlx5/ |
D | odp.c | 141 struct mlx5_ib_mr *mtt = odp->private; in mlx5_odp_populate_klm() local 143 pklm->key = cpu_to_be32(mtt->ibmr.lkey); in mlx5_odp_populate_klm() 374 struct mlx5_ib_mr *mtt; in implicit_mr_get_data() local 394 mtt = implicit_mr_alloc(mr->ibmr.pd, umem, 0, mr->access_flags); in implicit_mr_get_data() 395 if (IS_ERR(mtt)) { in implicit_mr_get_data() 398 return ERR_CAST(mtt); in implicit_mr_get_data() 402 odp->private = mtt; in implicit_mr_get_data() 403 mtt->umem = umem; in implicit_mr_get_data() 404 mtt->mmkey.iova = addr; in implicit_mr_get_data() 405 mtt->parent = mr; in implicit_mr_get_data()
|
D | devx.c | 892 (MLX5_ST_SZ_BYTES(mtt) * obj->ncont); in devx_umem_reg_cmd_alloc() 902 __be64 *mtt; in devx_umem_reg_cmd_build() local 905 mtt = (__be64 *)MLX5_ADDR_OF(umem, umem, mtt); in devx_umem_reg_cmd_build() 913 mlx5_ib_populate_pas(dev, obj->umem, obj->page_shift, mtt, in devx_umem_reg_cmd_build()
|
/Linux-v4.19/include/linux/mlx4/ |
D | device.h | 683 struct mlx4_mtt mtt; member 688 struct mlx4_mtt mtt; member 845 int mtt; member 1112 struct mlx4_mtt *mtt); 1113 void mlx4_mtt_cleanup(struct mlx4_dev *dev, struct mlx4_mtt *mtt); 1114 u64 mlx4_mtt_addr(struct mlx4_dev *dev, struct mlx4_mtt *mtt); 1124 int mlx4_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, 1126 int mlx4_buf_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, 1137 int mlx4_cq_alloc(struct mlx4_dev *dev, int nent, struct mlx4_mtt *mtt, 1149 struct mlx4_mtt *mtt, u64 db_rec, struct mlx4_srq *srq);
|
D | qp.h | 477 int mlx4_qp_modify(struct mlx4_dev *dev, struct mlx4_mtt *mtt, 485 int mlx4_qp_to_ready(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
|
D | cq.h | 180 int entries, struct mlx4_mtt *mtt);
|
/Linux-v4.19/drivers/net/ethernet/mellanox/mlx5/core/diag/ |
D | fw_tracer.c | 177 __be64 *mtt; in mlx5_fw_tracer_create_mkey() local 182 sizeof(*mtt) * round_up(TRACER_BUFFER_PAGE_NUM, 2); in mlx5_fw_tracer_create_mkey() 190 mtt = (u64 *)MLX5_ADDR_OF(create_mkey_in, in, klm_pas_mtt); in mlx5_fw_tracer_create_mkey() 192 mtt[i] = cpu_to_be64(tracer->buff.dma + i * PAGE_SIZE); in mlx5_fw_tracer_create_mkey()
|