Home
last modified time | relevance | path

Searched refs:mtt (Results 1 – 25 of 32) sorted by relevance

12

/kernel/linux/linux-5.10/drivers/infiniband/hw/mthca/
Dmthca_mr.c211 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 …]
Dmthca_provider.c889 mr->mtt = mthca_alloc_mtt(dev, n); in mthca_reg_user_mr()
890 if (IS_ERR(mr->mtt)) { in mthca_reg_user_mr()
891 err = PTR_ERR(mr->mtt); in mthca_reg_user_mr()
913 err = mthca_write_mtt(dev, mr->mtt, n, pages, i); in mthca_reg_user_mr()
922 err = mthca_write_mtt(dev, mr->mtt, n, pages, i); in mthca_reg_user_mr()
937 mthca_free_mtt(dev, mr->mtt); in mthca_reg_user_mr()
Dmthca_provider.h76 struct mthca_mtt *mtt; member
Dmthca_dev.h467 void mthca_free_mtt(struct mthca_dev *dev, struct mthca_mtt *mtt);
468 int mthca_write_mtt(struct mthca_dev *dev, struct mthca_mtt *mtt,
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx4/
Dmr.c195 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 …]
Dresource_tracker.c110 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()
2744 int size, struct res_mtt *mtt) in check_mtt_range() argument
2746 int res_start = mtt->com.res_id; in check_mtt_range()
2747 int res_size = (1 << mtt->order); in check_mtt_range()
[all …]
Dcq.c192 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()
342 struct mlx4_mtt *mtt, struct mlx4_uar *uar, u64 db_rec, in mlx4_cq_alloc() argument
384 cq_context->log_page_size = mtt->page_shift - MLX4_ICM_PAGE_SHIFT; in mlx4_cq_alloc()
386 mtt_addr = mlx4_mtt_addr(dev, mtt); in mlx4_cq_alloc()
Dsrq.c163 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()
Dqp.c87 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()
Dalloc.c790 &wqres->mtt); in mlx4_alloc_hwq_res()
794 err = mlx4_buf_write_mtt(dev, &wqres->mtt, &wqres->buf); in mlx4_alloc_hwq_res()
801 mlx4_mtt_cleanup(dev, &wqres->mtt); in mlx4_alloc_hwq_res()
814 mlx4_mtt_cleanup(dev, &wqres->mtt); in mlx4_free_hwq_res()
Den_cq.c141 err = mlx4_cq_alloc(mdev->dev, cq->size, &cq->wqres.mtt, in mlx4_en_activate_cq()
Deq.c1028 err = mlx4_mtt_init(dev, npages, PAGE_SHIFT, &eq->mtt); in mlx4_create_eq()
1032 err = mlx4_write_mtt(dev, &eq->mtt, 0, npages, dma_list); in mlx4_create_eq()
1042 mtt_addr = mlx4_mtt_addr(dev, &eq->mtt); in mlx4_create_eq()
1065 mlx4_mtt_cleanup(dev, &eq->mtt); in mlx4_create_eq()
1105 mlx4_mtt_cleanup(dev, &eq->mtt); in mlx4_free_eq()
/kernel/linux/linux-5.10/drivers/infiniband/hw/mlx4/
Dsrq.c120 PAGE_SHIFT, &srq->mtt); in mlx4_ib_create_srq()
124 err = mlx4_ib_umem_write_mtt(dev, &srq->mtt, srq->umem); in mlx4_ib_create_srq()
160 &srq->mtt); in mlx4_ib_create_srq()
164 err = mlx4_buf_write_mtt(dev->dev, &srq->mtt, &srq->buf); in mlx4_ib_create_srq()
182 &srq->mtt, srq->db.dma, &srq->msrq); in mlx4_ib_create_srq()
206 mlx4_mtt_cleanup(dev->dev, &srq->mtt); in mlx4_ib_create_srq()
270 mlx4_mtt_cleanup(dev->dev, &msrq->mtt); in mlx4_ib_destroy_srq()
Dcq.c113 &buf->mtt); in mlx4_ib_alloc_cq_buf()
117 err = mlx4_buf_write_mtt(dev->dev, &buf->mtt, &buf->buf); in mlx4_ib_alloc_cq_buf()
124 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, cq->db.dma, in mlx4_ib_create_cq()
277 mlx4_mtt_cleanup(dev->dev, &cq->buf.mtt); in mlx4_ib_create_cq()
383 struct mlx4_mtt mtt; in mlx4_ib_resize_cq() local
421 mtt = cq->buf.mtt; in mlx4_ib_resize_cq()
[all …]
Dmr.c95 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()
528 err = mlx4_ib_umem_write_mtt(dev, &mmr->mmr.mtt, mmr->umem); in mlx4_ib_rereg_user_mr()
Dmlx4_ib.h106 struct mlx4_mtt mtt; member
341 struct mlx4_mtt mtt; member
384 struct mlx4_mtt mtt; member
753 int mlx4_ib_umem_write_mtt(struct mlx4_ib_dev *dev, struct mlx4_mtt *mtt,
Dqp.c644 qp->mtt = (to_mqp( in create_qp_rss()
645 (struct ib_qp *)init_attr->rwq_ind_tbl->ind_tbl[0]))->mtt; in create_qp_rss()
889 err = mlx4_mtt_init(dev->dev, n, shift, &qp->mtt); in create_rq()
894 err = mlx4_ib_umem_write_mtt(dev, &qp->mtt, qp->umem); in create_rq()
945 mlx4_mtt_cleanup(dev->dev, &qp->mtt); in create_rq()
1072 err = mlx4_mtt_init(dev->dev, n, shift, &qp->mtt); in create_qp_common()
1077 err = mlx4_ib_umem_write_mtt(dev, &qp->mtt, qp->umem); in create_qp_common()
1127 &qp->mtt); in create_qp_common()
1131 err = mlx4_buf_write_mtt(dev->dev, &qp->mtt, &qp->buf); in create_qp_common()
1233 mlx4_mtt_cleanup(dev->dev, &qp->mtt); in create_qp_common()
[all …]
/kernel/linux/linux-5.10/drivers/infiniband/hw/mlx5/
Dodp.c135 struct mlx5_ib_mr *mtt = xa_load(&imr->implicit_children, idx); in populate_klm() local
138 if (mtt) { in populate_klm()
139 pklm->key = cpu_to_be32(mtt->ibmr.lkey); in populate_klm()
589 struct mlx5_ib_mr *mtt; in mlx5_ib_free_implicit_mr() local
621 xa_for_each (&imr->implicit_children, idx, mtt) { in mlx5_ib_free_implicit_mr()
623 list_add(&mtt->odp_destroy.elm, &destroy_list); in mlx5_ib_free_implicit_mr()
640 list_for_each_entry_safe (mtt, tmp, &destroy_list, odp_destroy.elm) in mlx5_ib_free_implicit_mr()
641 free_implicit_child_mr(mtt, false); in mlx5_ib_free_implicit_mr()
741 struct mlx5_ib_mr *mtt; in pagefault_implicit_mr() local
744 mtt = xa_load(&imr->implicit_children, idx); in pagefault_implicit_mr()
[all …]
Ddevx.c2105 (MLX5_ST_SZ_BYTES(mtt) * obj->ncont); in devx_umem_reg_cmd_alloc()
2115 __be64 *mtt; in devx_umem_reg_cmd_build() local
2118 mtt = (__be64 *)MLX5_ADDR_OF(umem, umem, mtt); in devx_umem_reg_cmd_build()
2125 mlx5_ib_populate_pas(dev, obj->umem, obj->page_shift, mtt, in devx_umem_reg_cmd_build()
/kernel/linux/linux-5.10/include/linux/mlx4/
Ddevice.h684 struct mlx4_mtt mtt; member
689 struct mlx4_mtt mtt; member
835 int mtt; member
1102 struct mlx4_mtt *mtt);
1103 void mlx4_mtt_cleanup(struct mlx4_dev *dev, struct mlx4_mtt *mtt);
1104 u64 mlx4_mtt_addr(struct mlx4_dev *dev, struct mlx4_mtt *mtt);
1114 int mlx4_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
1116 int mlx4_buf_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
1127 int mlx4_cq_alloc(struct mlx4_dev *dev, int nent, struct mlx4_mtt *mtt,
1140 struct mlx4_mtt *mtt, u64 db_rec, struct mlx4_srq *srq);
Dqp.h477 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,
Dcq.h185 int entries, struct mlx4_mtt *mtt);
/kernel/linux/linux-5.10/drivers/vdpa/mlx5/core/
Dmr.c34 static void populate_mtts(struct mlx5_vdpa_direct_mr *mr, __be64 *mtt) in populate_mtts() argument
47 mtt[j++] = cpu_to_be64(dma_addr); in populate_mtts()
58 inlen = MLX5_ST_SZ_BYTES(create_mkey_in) + roundup(MLX5_ST_SZ_BYTES(mtt) * mr->nsg, 16); in create_direct_mr()
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx5/core/diag/
Dfw_tracer.c180 __be64 *mtt; in mlx5_fw_tracer_create_mkey() local
185 sizeof(*mtt) * round_up(TRACER_BUFFER_PAGE_NUM, 2); in mlx5_fw_tracer_create_mkey()
193 mtt = (__be64 *)MLX5_ADDR_OF(create_mkey_in, in, klm_pas_mtt); in mlx5_fw_tracer_create_mkey()
195 mtt[i] = cpu_to_be64(tracer->buff.dma + i * PAGE_SIZE); in mlx5_fw_tracer_create_mkey()
/kernel/linux/linux-5.10/drivers/usb/host/
Dxhci.h2485 u32 mtt; in xhci_decode_slot_context() local
2490 mtt = info & DEV_MTT; in xhci_decode_slot_context()
2514 mtt ? " multi-TT" : "", in xhci_decode_slot_context()

12