Home
last modified time | relevance | path

Searched refs:hr_cq (Results 1 – 7 of 7) sorted by relevance

/Linux-v5.15/drivers/infiniband/hw/hns/
Dhns_roce_cq.c59 static int alloc_cqn(struct hns_roce_dev *hr_dev, struct hns_roce_cq *hr_cq) in alloc_cqn() argument
77 hr_cq->cqn = (id << CQ_BANKID_SHIFT) | bankid; in alloc_cqn()
104 static int alloc_cqc(struct hns_roce_dev *hr_dev, struct hns_roce_cq *hr_cq) in alloc_cqc() argument
113 ret = hns_roce_mtr_find(hr_dev, &hr_cq->mtr, 0, mtts, ARRAY_SIZE(mtts), in alloc_cqc()
121 ret = hns_roce_table_get(hr_dev, &cq_table->table, hr_cq->cqn); in alloc_cqc()
124 hr_cq->cqn, ret); in alloc_cqc()
128 ret = xa_err(xa_store(&cq_table->array, hr_cq->cqn, hr_cq, GFP_KERNEL)); in alloc_cqc()
141 hr_dev->hw->write_cqc(hr_dev, hr_cq, mailbox->buf, mtts, dma_handle); in alloc_cqc()
144 ret = hns_roce_cmd_mbox(hr_dev, mailbox->dma, 0, hr_cq->cqn, 0, in alloc_cqc()
150 hr_cq->cqn, ret); in alloc_cqc()
[all …]
Dhns_roce_hw_v1.c1981 static void *get_cqe(struct hns_roce_cq *hr_cq, int n) in get_cqe() argument
1983 return hns_roce_buf_offset(hr_cq->mtr.kmem, n * HNS_ROCE_V1_CQE_SIZE); in get_cqe()
1986 static void *get_sw_cqe(struct hns_roce_cq *hr_cq, int n) in get_sw_cqe() argument
1988 struct hns_roce_cqe *hr_cqe = get_cqe(hr_cq, n & hr_cq->ib_cq.cqe); in get_sw_cqe()
1992 !!(n & hr_cq->cq_depth)) ? hr_cqe : NULL; in get_sw_cqe()
1995 static struct hns_roce_cqe *next_cqe_sw(struct hns_roce_cq *hr_cq) in next_cqe_sw() argument
1997 return get_sw_cqe(hr_cq, hr_cq->cons_index); in next_cqe_sw()
2000 static void hns_roce_v1_cq_set_ci(struct hns_roce_cq *hr_cq, u32 cons_index) in hns_roce_v1_cq_set_ci() argument
2004 doorbell[0] = cpu_to_le32(cons_index & ((hr_cq->cq_depth << 1) - 1)); in hns_roce_v1_cq_set_ci()
2012 ROCEE_DB_OTHERS_H_ROCEE_DB_OTH_INP_H_S, hr_cq->cqn); in hns_roce_v1_cq_set_ci()
[all …]
Dhns_roce_restrack.c83 struct hns_roce_cq *hr_cq = to_hr_cq(ib_cq); in hns_roce_fill_res_cq_entry() local
95 ret = hr_dev->dfx->query_cqc_info(hr_dev, hr_cq->cqn, (int *)context); in hns_roce_fill_res_cq_entry()
Dhns_roce_hw_v2.c3239 static void *get_cqe_v2(struct hns_roce_cq *hr_cq, int n) in get_cqe_v2() argument
3241 return hns_roce_buf_offset(hr_cq->mtr.kmem, n * hr_cq->cqe_size); in get_cqe_v2()
3244 static void *get_sw_cqe_v2(struct hns_roce_cq *hr_cq, unsigned int n) in get_sw_cqe_v2() argument
3246 struct hns_roce_v2_cqe *cqe = get_cqe_v2(hr_cq, n & hr_cq->ib_cq.cqe); in get_sw_cqe_v2()
3249 return (hr_reg_read(cqe, CQE_OWNER) ^ !!(n & hr_cq->cq_depth)) ? cqe : in get_sw_cqe_v2()
3254 struct hns_roce_cq *hr_cq) in update_cq_db() argument
3256 if (likely(hr_cq->flags & HNS_ROCE_CQ_FLAG_RECORD_DB)) { in update_cq_db()
3257 *hr_cq->set_ci_db = hr_cq->cons_index & V2_CQ_DB_CONS_IDX_M; in update_cq_db()
3261 hr_reg_write(&cq_db, DB_TAG, hr_cq->cqn); in update_cq_db()
3263 hr_reg_write(&cq_db, DB_CQ_CI, hr_cq->cons_index); in update_cq_db()
[all …]
Dhns_roce_main.c777 struct hns_roce_cq *hr_cq = to_hr_cq(cq); in check_and_get_armed_cq() local
780 spin_lock_irqsave(&hr_cq->lock, flags); in check_and_get_armed_cq()
782 if (!hr_cq->is_armed) { in check_and_get_armed_cq()
783 hr_cq->is_armed = 1; in check_and_get_armed_cq()
784 list_add_tail(&hr_cq->node, cq_list); in check_and_get_armed_cq()
787 spin_unlock_irqrestore(&hr_cq->lock, flags); in check_and_get_armed_cq()
793 struct hns_roce_cq *hr_cq; in hns_roce_handle_device_err() local
813 list_for_each_entry(hr_cq, &cq_list, node) in hns_roce_handle_device_err()
814 hns_roce_cq_completion(hr_dev, hr_cq->cqn); in hns_roce_handle_device_err()
Dhns_roce_qp.c1417 struct hns_roce_cq *hr_cq; in hns_roce_wq_overflow() local
1424 hr_cq = to_hr_cq(ib_cq); in hns_roce_wq_overflow()
1425 spin_lock(&hr_cq->lock); in hns_roce_wq_overflow()
1427 spin_unlock(&hr_cq->lock); in hns_roce_wq_overflow()
Dhns_roce_device.h913 struct hns_roce_cq *hr_cq, void *mb_buf, u64 *mtts,