Lines Matching refs:qp_id

805 			qm_db(qm, qp->qp_id, QM_DOORBELL_CMD_CQ,  in qm_poll_qp()
811 qm_db(qm, qp->qp_id, QM_DOORBELL_CMD_CQ, in qm_poll_qp()
1554 static int qm_dump_sqc_raw(struct hisi_qm *qm, dma_addr_t dma_addr, u16 qp_id) in qm_dump_sqc_raw() argument
1556 return qm_mb(qm, QM_MB_CMD_SQC, dma_addr, qp_id, 1); in qm_dump_sqc_raw()
1559 static int qm_dump_cqc_raw(struct hisi_qm *qm, dma_addr_t dma_addr, u16 qp_id) in qm_dump_cqc_raw() argument
1561 return qm_mb(qm, QM_MB_CMD_CQC, dma_addr, qp_id, 1); in qm_dump_cqc_raw()
1569 u32 qp_id; in qm_sqc_dump() local
1575 ret = kstrtou32(s, 0, &qp_id); in qm_sqc_dump()
1576 if (ret || qp_id >= qm->qp_num) { in qm_sqc_dump()
1585 ret = qm_dump_sqc_raw(qm, sqc_dma, qp_id); in qm_sqc_dump()
1589 sqc_curr = qm->sqc + qp_id; in qm_sqc_dump()
1615 u32 qp_id; in qm_cqc_dump() local
1621 ret = kstrtou32(s, 0, &qp_id); in qm_cqc_dump()
1622 if (ret || qp_id >= qm->qp_num) { in qm_cqc_dump()
1631 ret = qm_dump_cqc_raw(qm, cqc_dma, qp_id); in qm_cqc_dump()
1635 cqc_curr = qm->cqc + qp_id; in qm_cqc_dump()
1731 u32 qp_id, sqe_id; in qm_sq_dump() local
1734 ret = q_dump_param_parse(qm, s, &sqe_id, &qp_id); in qm_sq_dump()
1742 qp = &qm->qp_array[qp_id]; in qm_sq_dump()
1762 u32 qp_id, cqe_id; in qm_cq_dump() local
1765 ret = q_dump_param_parse(qm, s, &cqe_id, &qp_id); in qm_cq_dump()
1769 qp = &qm->qp_array[qp_id]; in qm_cq_dump()
2355 return qm_mb(qp->qm, QM_MB_CMD_STOP_QP, 0, qp->qp_id, 0); in qm_stop_qp()
2499 int qp_id; in qm_create_qp_nolock() local
2511 qp_id = idr_alloc_cyclic(&qm->qp_idr, NULL, 0, qm->qp_num, GFP_ATOMIC); in qm_create_qp_nolock()
2512 if (qp_id < 0) { in qm_create_qp_nolock()
2519 qp = &qm->qp_array[qp_id]; in qm_create_qp_nolock()
2525 qp->qp_id = qp_id; in qm_create_qp_nolock()
2580 idr_remove(&qm->qp_idr, qp->qp_id); in hisi_qm_release_qp()
2588 static int qm_sq_ctx_cfg(struct hisi_qp *qp, int qp_id, u32 pasid) in qm_sq_ctx_cfg() argument
2609 sqc->cq_num = cpu_to_le16(qp_id); in qm_sq_ctx_cfg()
2623 ret = qm_mb(qm, QM_MB_CMD_SQC, sqc_dma, qp_id, 0); in qm_sq_ctx_cfg()
2630 static int qm_cq_ctx_cfg(struct hisi_qp *qp, int qp_id, u32 pasid) in qm_cq_ctx_cfg() argument
2664 ret = qm_mb(qm, QM_MB_CMD_CQC, cqc_dma, qp_id, 0); in qm_cq_ctx_cfg()
2671 static int qm_qp_ctx_cfg(struct hisi_qp *qp, int qp_id, u32 pasid) in qm_qp_ctx_cfg() argument
2677 ret = qm_sq_ctx_cfg(qp, qp_id, pasid); in qm_qp_ctx_cfg()
2681 return qm_cq_ctx_cfg(qp, qp_id, pasid); in qm_qp_ctx_cfg()
2688 int qp_id = qp->qp_id; in qm_start_qp_nolock() local
2695 ret = qm_qp_ctx_cfg(qp, qp_id, pasid); in qm_start_qp_nolock()
2700 dev_dbg(dev, "queue %d started\n", qp_id); in qm_start_qp_nolock()
2774 dev_err(dev, "Failed to stop qp(%u)!\n", qp->qp_id); in qm_drain_qp()
2785 ret = qm_dump_sqc_raw(qm, dma_addr, qp->qp_id); in qm_drain_qp()
2793 qp->qp_id); in qm_drain_qp()
2805 dev_err(dev, "Fail to empty queue %u!\n", qp->qp_id); in qm_drain_qp()
2851 dev_dbg(dev, "stop queue %u!", qp->qp_id); in qm_stop_qp_nolock()
2908 qm_db(qp->qm, qp->qp_id, QM_DOORBELL_CMD_SQ, sq_tail_next, 0); in hisi_qp_send()
2986 qp->qp_id * qm->db_interval; in hisi_qm_uacce_mmap()
3086 qp_ctx.id = qp->qp_id; in hisi_qm_uacce_ioctl()
3299 qp->qp_id = id; in hisi_qp_memory_init()