Lines Matching refs:pfvf
64 struct rvu_pfvf *pfvf; in rvu_npa_aq_enq_inst() local
68 pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_npa_aq_enq_inst()
69 if (!pfvf->aura_ctx || req->aura_id >= pfvf->aura_ctx->qsize) in rvu_npa_aq_enq_inst()
73 if (!pfvf->npalf || blkaddr < 0) in rvu_npa_aq_enq_inst()
124 if (req->aura.pool_addr >= pfvf->pool_ctx->qsize) { in rvu_npa_aq_enq_inst()
129 req->aura.pool_addr = pfvf->pool_ctx->iova + in rvu_npa_aq_enq_inst()
130 (req->aura.pool_addr * pfvf->pool_ctx->entry_sz); in rvu_npa_aq_enq_inst()
161 __set_bit(req->aura_id, pfvf->aura_bmap); in rvu_npa_aq_enq_inst()
164 (test_bit(req->aura_id, pfvf->aura_bmap) & in rvu_npa_aq_enq_inst()
167 __set_bit(req->aura_id, pfvf->aura_bmap); in rvu_npa_aq_enq_inst()
169 __clear_bit(req->aura_id, pfvf->aura_bmap); in rvu_npa_aq_enq_inst()
176 __set_bit(req->aura_id, pfvf->pool_bmap); in rvu_npa_aq_enq_inst()
179 (test_bit(req->aura_id, pfvf->pool_bmap) & in rvu_npa_aq_enq_inst()
182 __set_bit(req->aura_id, pfvf->pool_bmap); in rvu_npa_aq_enq_inst()
184 __clear_bit(req->aura_id, pfvf->pool_bmap); in rvu_npa_aq_enq_inst()
206 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, req->hdr.pcifunc); in npa_lf_hwctx_disable() local
212 if (!pfvf->pool_ctx || !pfvf->aura_ctx) in npa_lf_hwctx_disable()
221 cnt = pfvf->pool_ctx->qsize; in npa_lf_hwctx_disable()
222 bmap = pfvf->pool_bmap; in npa_lf_hwctx_disable()
228 cnt = pfvf->aura_ctx->qsize; in npa_lf_hwctx_disable()
229 bmap = pfvf->aura_bmap; in npa_lf_hwctx_disable()
303 static void npa_ctx_free(struct rvu *rvu, struct rvu_pfvf *pfvf) in npa_ctx_free() argument
305 kfree(pfvf->aura_bmap); in npa_ctx_free()
306 pfvf->aura_bmap = NULL; in npa_ctx_free()
308 qmem_free(rvu->dev, pfvf->aura_ctx); in npa_ctx_free()
309 pfvf->aura_ctx = NULL; in npa_ctx_free()
311 kfree(pfvf->pool_bmap); in npa_ctx_free()
312 pfvf->pool_bmap = NULL; in npa_ctx_free()
314 qmem_free(rvu->dev, pfvf->pool_ctx); in npa_ctx_free()
315 pfvf->pool_ctx = NULL; in npa_ctx_free()
317 qmem_free(rvu->dev, pfvf->npa_qints_ctx); in npa_ctx_free()
318 pfvf->npa_qints_ctx = NULL; in npa_ctx_free()
329 struct rvu_pfvf *pfvf; in rvu_mbox_handler_npa_lf_alloc() local
340 pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_mbox_handler_npa_lf_alloc()
342 if (!pfvf->npalf || blkaddr < 0) in rvu_mbox_handler_npa_lf_alloc()
361 err = qmem_alloc(rvu->dev, &pfvf->aura_ctx, in rvu_mbox_handler_npa_lf_alloc()
366 pfvf->aura_bmap = kcalloc(NPA_AURA_COUNT(req->aura_sz), sizeof(long), in rvu_mbox_handler_npa_lf_alloc()
368 if (!pfvf->aura_bmap) in rvu_mbox_handler_npa_lf_alloc()
373 err = qmem_alloc(rvu->dev, &pfvf->pool_ctx, req->nr_pools, hwctx_size); in rvu_mbox_handler_npa_lf_alloc()
377 pfvf->pool_bmap = kcalloc(NPA_AURA_COUNT(req->aura_sz), sizeof(long), in rvu_mbox_handler_npa_lf_alloc()
379 if (!pfvf->pool_bmap) in rvu_mbox_handler_npa_lf_alloc()
388 err = qmem_alloc(rvu->dev, &pfvf->npa_qints_ctx, qints, hwctx_size); in rvu_mbox_handler_npa_lf_alloc()
402 (u64)pfvf->aura_ctx->iova); in rvu_mbox_handler_npa_lf_alloc()
408 (u64)pfvf->npa_qints_ctx->iova); in rvu_mbox_handler_npa_lf_alloc()
413 npa_ctx_free(rvu, pfvf); in rvu_mbox_handler_npa_lf_alloc()
431 struct rvu_pfvf *pfvf; in rvu_mbox_handler_npa_lf_free() local
435 pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_mbox_handler_npa_lf_free()
437 if (!pfvf->npalf || blkaddr < 0) in rvu_mbox_handler_npa_lf_free()
452 npa_ctx_free(rvu, pfvf); in rvu_mbox_handler_npa_lf_free()
530 struct rvu_pfvf *pfvf = rvu_get_pfvf(rvu, pcifunc); in rvu_npa_lf_teardown() local
542 npa_ctx_free(rvu, pfvf); in rvu_npa_lf_teardown()