Lines Matching refs:p_mngr

134 static u32 qed_cxt_cdu_iids(struct qed_cxt_mngr *p_mngr)  in qed_cxt_cdu_iids()  argument
139 pf_cids += p_mngr->conn_cfg[type].cid_count; in qed_cxt_cdu_iids()
147 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_qm_iids() local
151 iids->cids += p_mngr->conn_cfg[type].cid_count; in qed_cxt_qm_iids()
210 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_cfg_ilt_compute() local
218 p_mngr->pf_start_line = RESC_START(p_hwfn, QED_ILT); in qed_cxt_cfg_ilt_compute()
225 p_cli = &p_mngr->clients[ILT_CLI_CDUC]; in qed_cxt_cfg_ilt_compute()
226 curr_line = p_mngr->pf_start_line; in qed_cxt_cfg_ilt_compute()
230 pf_cids = qed_cxt_cdu_iids(p_mngr); in qed_cxt_cfg_ilt_compute()
243 p_cli = &p_mngr->clients[ILT_CLI_QM]; in qed_cxt_cfg_ilt_compute()
293 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_ilt_shadow_free() local
298 for (i = 0; p_mngr->ilt_shadow && i < ilt_size; i++) { in qed_ilt_shadow_free()
299 struct qed_dma_mem *p_dma = &p_mngr->ilt_shadow[i]; in qed_ilt_shadow_free()
307 kfree(p_mngr->ilt_shadow); in qed_ilt_shadow_free()
358 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_ilt_shadow_alloc() local
359 struct qed_ilt_client_cfg *clients = p_mngr->clients; in qed_ilt_shadow_alloc()
365 p_mngr->ilt_shadow = kcalloc(size, sizeof(struct qed_dma_mem), in qed_ilt_shadow_alloc()
367 if (!p_mngr->ilt_shadow) { in qed_ilt_shadow_alloc()
397 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cid_map_free() local
401 kfree(p_mngr->acquired[type].cid_map); in qed_cid_map_free()
402 p_mngr->acquired[type].max_count = 0; in qed_cid_map_free()
403 p_mngr->acquired[type].start_cid = 0; in qed_cid_map_free()
409 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cid_map_alloc() local
423 p_mngr->acquired[type].cid_map = kzalloc(size, GFP_KERNEL); in qed_cid_map_alloc()
424 if (!p_mngr->acquired[type].cid_map) in qed_cid_map_alloc()
427 p_mngr->acquired[type].max_count = cid_cnt; in qed_cid_map_alloc()
428 p_mngr->acquired[type].start_cid = start_cid; in qed_cid_map_alloc()
434 type, p_mngr->acquired[type].start_cid, in qed_cid_map_alloc()
435 p_mngr->acquired[type].max_count); in qed_cid_map_alloc()
448 struct qed_cxt_mngr *p_mngr; in qed_cxt_mngr_alloc() local
451 p_mngr = kzalloc(sizeof(*p_mngr), GFP_ATOMIC); in qed_cxt_mngr_alloc()
452 if (!p_mngr) { in qed_cxt_mngr_alloc()
458 p_mngr->clients[ILT_CLI_CDUC].first.reg = ILT_CFG_REG(CDUC, FIRST_ILT); in qed_cxt_mngr_alloc()
459 p_mngr->clients[ILT_CLI_CDUC].last.reg = ILT_CFG_REG(CDUC, LAST_ILT); in qed_cxt_mngr_alloc()
460 p_mngr->clients[ILT_CLI_CDUC].p_size.reg = ILT_CFG_REG(CDUC, P_SIZE); in qed_cxt_mngr_alloc()
462 p_mngr->clients[ILT_CLI_QM].first.reg = ILT_CFG_REG(QM, FIRST_ILT); in qed_cxt_mngr_alloc()
463 p_mngr->clients[ILT_CLI_QM].last.reg = ILT_CFG_REG(QM, LAST_ILT); in qed_cxt_mngr_alloc()
464 p_mngr->clients[ILT_CLI_QM].p_size.reg = ILT_CFG_REG(QM, P_SIZE); in qed_cxt_mngr_alloc()
468 p_mngr->clients[i].p_size.val = ILT_DEFAULT_HW_P_SIZE; in qed_cxt_mngr_alloc()
471 p_hwfn->p_cxt_mngr = p_mngr; in qed_cxt_mngr_alloc()
515 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_mngr_setup() local
525 memset(p_mngr->acquired[type].cid_map, 0, in qed_cxt_mngr_setup()
611 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_dq_init_pf() local
614 dq_pf_max_cid += (p_mngr->conn_cfg[0].cid_count >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
617 dq_pf_max_cid += (p_mngr->conn_cfg[1].cid_count >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
620 dq_pf_max_cid += (p_mngr->conn_cfg[2].cid_count >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
623 dq_pf_max_cid += (p_mngr->conn_cfg[3].cid_count >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
626 dq_pf_max_cid += (p_mngr->conn_cfg[4].cid_count >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
630 dq_pf_max_cid += (p_mngr->conn_cfg[5].cid_count >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
659 struct qed_cxt_mngr *p_mngr; in qed_ilt_init_pf() local
665 p_mngr = p_hwfn->p_cxt_mngr; in qed_ilt_init_pf()
666 p_shdw = p_mngr->ilt_shadow; in qed_ilt_init_pf()
676 line = clients[i].first.val - p_mngr->pf_start_line; in qed_ilt_init_pf()
680 for (; line <= clients[i].last.val - p_mngr->pf_start_line; in qed_ilt_init_pf()
720 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_acquire_cid() local
723 if (type >= MAX_CONN_TYPES || !p_mngr->acquired[type].cid_map) { in qed_cxt_acquire_cid()
728 rel_cid = find_first_zero_bit(p_mngr->acquired[type].cid_map, in qed_cxt_acquire_cid()
729 p_mngr->acquired[type].max_count); in qed_cxt_acquire_cid()
731 if (rel_cid >= p_mngr->acquired[type].max_count) { in qed_cxt_acquire_cid()
737 __set_bit(rel_cid, p_mngr->acquired[type].cid_map); in qed_cxt_acquire_cid()
739 *p_cid = rel_cid + p_mngr->acquired[type].start_cid; in qed_cxt_acquire_cid()
748 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_test_cid_acquired() local
755 p_map = &p_mngr->acquired[p]; in qed_cxt_test_cid_acquired()
781 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_release_cid() local
792 rel_cid = cid - p_mngr->acquired[type].start_cid; in qed_cxt_release_cid()
793 __clear_bit(rel_cid, p_mngr->acquired[type].cid_map); in qed_cxt_release_cid()
799 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_get_cid_info() local
821 if (!p_mngr->ilt_shadow[line].p_virt) in qed_cxt_get_cid_info()
824 p_info->p_cxt = p_mngr->ilt_shadow[line].p_virt + in qed_cxt_get_cid_info()