Lines Matching refs:pfvf

70 	struct rvu_pfvf *pfvf;  in rvu_npa_aq_enq_inst()  local
74 pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_npa_aq_enq_inst()
75 if (!pfvf->aura_ctx || req->aura_id >= pfvf->aura_ctx->qsize) in rvu_npa_aq_enq_inst()
79 if (!pfvf->npalf || blkaddr < 0) in rvu_npa_aq_enq_inst()
130 if (req->aura.pool_addr >= pfvf->pool_ctx->qsize) { in rvu_npa_aq_enq_inst()
135 req->aura.pool_addr = pfvf->pool_ctx->iova + in rvu_npa_aq_enq_inst()
136 (req->aura.pool_addr * pfvf->pool_ctx->entry_sz); in rvu_npa_aq_enq_inst()
167 __set_bit(req->aura_id, pfvf->aura_bmap); in rvu_npa_aq_enq_inst()
170 (test_bit(req->aura_id, pfvf->aura_bmap) & in rvu_npa_aq_enq_inst()
173 __set_bit(req->aura_id, pfvf->aura_bmap); in rvu_npa_aq_enq_inst()
175 __clear_bit(req->aura_id, pfvf->aura_bmap); in rvu_npa_aq_enq_inst()
182 __set_bit(req->aura_id, pfvf->pool_bmap); in rvu_npa_aq_enq_inst()
185 (test_bit(req->aura_id, pfvf->pool_bmap) & in rvu_npa_aq_enq_inst()
188 __set_bit(req->aura_id, pfvf->pool_bmap); in rvu_npa_aq_enq_inst()
190 __clear_bit(req->aura_id, pfvf->pool_bmap); in rvu_npa_aq_enq_inst()
212 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, req->hdr.pcifunc); in npa_lf_hwctx_disable() local
218 if (!pfvf->pool_ctx || !pfvf->aura_ctx) in npa_lf_hwctx_disable()
227 cnt = pfvf->pool_ctx->qsize; in npa_lf_hwctx_disable()
228 bmap = pfvf->pool_bmap; in npa_lf_hwctx_disable()
234 cnt = pfvf->aura_ctx->qsize; in npa_lf_hwctx_disable()
235 bmap = pfvf->aura_bmap; in npa_lf_hwctx_disable()
309 static void npa_ctx_free(struct rvu *rvu, struct rvu_pfvf *pfvf) in npa_ctx_free() argument
311 kfree(pfvf->aura_bmap); in npa_ctx_free()
312 pfvf->aura_bmap = NULL; in npa_ctx_free()
314 qmem_free(rvu->dev, pfvf->aura_ctx); in npa_ctx_free()
315 pfvf->aura_ctx = NULL; in npa_ctx_free()
317 kfree(pfvf->pool_bmap); in npa_ctx_free()
318 pfvf->pool_bmap = NULL; in npa_ctx_free()
320 qmem_free(rvu->dev, pfvf->pool_ctx); in npa_ctx_free()
321 pfvf->pool_ctx = NULL; in npa_ctx_free()
323 qmem_free(rvu->dev, pfvf->npa_qints_ctx); in npa_ctx_free()
324 pfvf->npa_qints_ctx = NULL; in npa_ctx_free()
335 struct rvu_pfvf *pfvf; in rvu_mbox_handler_npa_lf_alloc() local
346 pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_mbox_handler_npa_lf_alloc()
348 if (!pfvf->npalf || blkaddr < 0) in rvu_mbox_handler_npa_lf_alloc()
367 err = qmem_alloc(rvu->dev, &pfvf->aura_ctx, in rvu_mbox_handler_npa_lf_alloc()
372 pfvf->aura_bmap = kcalloc(NPA_AURA_COUNT(req->aura_sz), sizeof(long), in rvu_mbox_handler_npa_lf_alloc()
374 if (!pfvf->aura_bmap) in rvu_mbox_handler_npa_lf_alloc()
379 err = qmem_alloc(rvu->dev, &pfvf->pool_ctx, req->nr_pools, hwctx_size); in rvu_mbox_handler_npa_lf_alloc()
383 pfvf->pool_bmap = kcalloc(NPA_AURA_COUNT(req->aura_sz), sizeof(long), in rvu_mbox_handler_npa_lf_alloc()
385 if (!pfvf->pool_bmap) in rvu_mbox_handler_npa_lf_alloc()
394 err = qmem_alloc(rvu->dev, &pfvf->npa_qints_ctx, qints, hwctx_size); in rvu_mbox_handler_npa_lf_alloc()
408 (u64)pfvf->aura_ctx->iova); in rvu_mbox_handler_npa_lf_alloc()
414 (u64)pfvf->npa_qints_ctx->iova); in rvu_mbox_handler_npa_lf_alloc()
419 npa_ctx_free(rvu, pfvf); in rvu_mbox_handler_npa_lf_alloc()
441 struct rvu_pfvf *pfvf; in rvu_mbox_handler_npa_lf_free() local
445 pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_mbox_handler_npa_lf_free()
447 if (!pfvf->npalf || blkaddr < 0) in rvu_mbox_handler_npa_lf_free()
462 npa_ctx_free(rvu, pfvf); in rvu_mbox_handler_npa_lf_free()
543 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_npa_lf_teardown() local
555 npa_ctx_free(rvu, pfvf); in rvu_npa_lf_teardown()