Lines Matching refs:req_q
63 struct hisi_zip_req_q req_q; member
114 struct hisi_zip_req_q *req_q = &qp_ctx->req_q; in hisi_zip_create_req() local
115 struct hisi_zip_req *q = req_q->q; in hisi_zip_create_req()
119 spin_lock(&req_q->req_lock); in hisi_zip_create_req()
121 req_id = find_first_zero_bit(req_q->req_bitmap, req_q->size); in hisi_zip_create_req()
122 if (req_id >= req_q->size) { in hisi_zip_create_req()
123 spin_unlock(&req_q->req_lock); in hisi_zip_create_req()
127 set_bit(req_id, req_q->req_bitmap); in hisi_zip_create_req()
129 spin_unlock(&req_q->req_lock); in hisi_zip_create_req()
141 struct hisi_zip_req_q *req_q = &qp_ctx->req_q; in hisi_zip_remove_req() local
143 spin_lock(&req_q->req_lock); in hisi_zip_remove_req()
144 clear_bit(req->req_id, req_q->req_bitmap); in hisi_zip_remove_req()
145 spin_unlock(&req_q->req_lock); in hisi_zip_remove_req()
216 struct hisi_zip_req_q *req_q = &qp_ctx->req_q; in hisi_zip_do_work() local
248 spin_lock_bh(&req_q->req_lock); in hisi_zip_do_work()
250 spin_unlock_bh(&req_q->req_lock); in hisi_zip_do_work()
287 struct hisi_zip_req_q *req_q = &qp_ctx->req_q; in hisi_zip_acomp_cb() local
291 struct hisi_zip_req *req = req_q->q + tag; in hisi_zip_acomp_cb()
447 struct hisi_zip_req_q *req_q; in hisi_zip_create_req_q() local
451 req_q = &ctx->qp_ctx[i].req_q; in hisi_zip_create_req_q()
452 req_q->size = q_depth; in hisi_zip_create_req_q()
454 req_q->req_bitmap = bitmap_zalloc(req_q->size, GFP_KERNEL); in hisi_zip_create_req_q()
455 if (!req_q->req_bitmap) { in hisi_zip_create_req_q()
462 spin_lock_init(&req_q->req_lock); in hisi_zip_create_req_q()
464 req_q->q = kcalloc(req_q->size, sizeof(struct hisi_zip_req), in hisi_zip_create_req_q()
466 if (!req_q->q) { in hisi_zip_create_req_q()
478 bitmap_free(ctx->qp_ctx[HZIP_QPC_DECOMP].req_q.req_bitmap); in hisi_zip_create_req_q()
480 kfree(ctx->qp_ctx[HZIP_QPC_COMP].req_q.q); in hisi_zip_create_req_q()
482 bitmap_free(ctx->qp_ctx[HZIP_QPC_COMP].req_q.req_bitmap); in hisi_zip_create_req_q()
491 kfree(ctx->qp_ctx[i].req_q.q); in hisi_zip_release_req_q()
492 bitmap_free(ctx->qp_ctx[i].req_q.req_bitmap); in hisi_zip_release_req_q()