idx_que           538 drivers/infiniband/hw/hns/hns_roce_device.h 	struct hns_roce_idx_que idx_que;
idx_que          2481 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 	bitmap_clear(srq->idx_que.bitmap, wqe_index, 1);
idx_que          6204 drivers/infiniband/hw/hns/hns_roce_hw_v2.c static int find_empty_entry(struct hns_roce_idx_que *idx_que,
idx_que          6209 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 	if (unlikely(bitmap_full(idx_que->bitmap, size)))
idx_que          6212 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 	wqe_idx = find_first_zero_bit(idx_que->bitmap, size);
idx_que          6214 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 	bitmap_set(idx_que->bitmap, wqe_idx, 1);
idx_que          6219 drivers/infiniband/hw/hns/hns_roce_hw_v2.c static void fill_idx_queue(struct hns_roce_idx_que *idx_que,
idx_que          6224 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 	addr = (unsigned int *)hns_roce_buf_offset(&idx_que->idx_buf,
idx_que          6225 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 						   cur_idx * idx_que->entry_sz);
idx_que          6262 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 		wqe_idx = find_empty_entry(&srq->idx_que, srq->max);
idx_que          6269 drivers/infiniband/hw/hns/hns_roce_hw_v2.c 		fill_idx_queue(&srq->idx_que, ind, wqe_idx);
idx_que           105 drivers/infiniband/hw/hns/hns_roce_srq.c 				       srq->idx_que.mtt.first_seg,
idx_que           208 drivers/infiniband/hw/hns/hns_roce_srq.c 	srq->idx_que.umem = ib_umem_get(udata, ucmd.que_addr,
idx_que           209 drivers/infiniband/hw/hns/hns_roce_srq.c 					srq->idx_que.buf_size, 0, 0);
idx_que           210 drivers/infiniband/hw/hns/hns_roce_srq.c 	if (IS_ERR(srq->idx_que.umem)) {
idx_que           212 drivers/infiniband/hw/hns/hns_roce_srq.c 		ret = PTR_ERR(srq->idx_que.umem);
idx_que           216 drivers/infiniband/hw/hns/hns_roce_srq.c 	buf = &srq->idx_que.idx_buf;
idx_que           217 drivers/infiniband/hw/hns/hns_roce_srq.c 	buf->npages = DIV_ROUND_UP(ib_umem_page_count(srq->idx_que.umem),
idx_que           221 drivers/infiniband/hw/hns/hns_roce_srq.c 				&srq->idx_que.mtt);
idx_que           227 drivers/infiniband/hw/hns/hns_roce_srq.c 	ret = hns_roce_ib_umem_write_mtt(hr_dev, &srq->idx_que.mtt,
idx_que           228 drivers/infiniband/hw/hns/hns_roce_srq.c 					 srq->idx_que.umem);
idx_que           238 drivers/infiniband/hw/hns/hns_roce_srq.c 	hns_roce_mtt_cleanup(hr_dev, &srq->idx_que.mtt);
idx_que           241 drivers/infiniband/hw/hns/hns_roce_srq.c 	ib_umem_release(srq->idx_que.umem);
idx_que           256 drivers/infiniband/hw/hns/hns_roce_srq.c 	struct hns_roce_idx_que *idx_que = &srq->idx_que;
idx_que           258 drivers/infiniband/hw/hns/hns_roce_srq.c 	idx_que->bitmap = bitmap_zalloc(srq->max, GFP_KERNEL);
idx_que           259 drivers/infiniband/hw/hns/hns_roce_srq.c 	if (!idx_que->bitmap)
idx_que           262 drivers/infiniband/hw/hns/hns_roce_srq.c 	idx_que->buf_size = srq->idx_que.buf_size;
idx_que           264 drivers/infiniband/hw/hns/hns_roce_srq.c 	if (hns_roce_buf_alloc(hr_dev, idx_que->buf_size, (1 << page_shift) * 2,
idx_que           265 drivers/infiniband/hw/hns/hns_roce_srq.c 			       &idx_que->idx_buf, page_shift)) {
idx_que           266 drivers/infiniband/hw/hns/hns_roce_srq.c 		bitmap_free(idx_que->bitmap);
idx_que           303 drivers/infiniband/hw/hns/hns_roce_srq.c 	ret = hns_roce_mtt_init(hr_dev, srq->idx_que.idx_buf.npages,
idx_que           304 drivers/infiniband/hw/hns/hns_roce_srq.c 				srq->idx_que.idx_buf.page_shift,
idx_que           305 drivers/infiniband/hw/hns/hns_roce_srq.c 				&srq->idx_que.mtt);
idx_que           310 drivers/infiniband/hw/hns/hns_roce_srq.c 	ret = hns_roce_buf_write_mtt(hr_dev, &srq->idx_que.mtt,
idx_que           311 drivers/infiniband/hw/hns/hns_roce_srq.c 				     &srq->idx_que.idx_buf);
idx_que           324 drivers/infiniband/hw/hns/hns_roce_srq.c 	hns_roce_mtt_cleanup(hr_dev, &srq->idx_que.mtt);
idx_que           327 drivers/infiniband/hw/hns/hns_roce_srq.c 	hns_roce_buf_free(hr_dev, srq->idx_que.buf_size,
idx_que           328 drivers/infiniband/hw/hns/hns_roce_srq.c 			  &srq->idx_que.idx_buf);
idx_que           329 drivers/infiniband/hw/hns/hns_roce_srq.c 	kfree(srq->idx_que.bitmap);
idx_que           343 drivers/infiniband/hw/hns/hns_roce_srq.c 	hns_roce_mtt_cleanup(hr_dev, &srq->idx_que.mtt);
idx_que           344 drivers/infiniband/hw/hns/hns_roce_srq.c 	ib_umem_release(srq->idx_que.umem);
idx_que           353 drivers/infiniband/hw/hns/hns_roce_srq.c 	hns_roce_mtt_cleanup(hr_dev, &srq->idx_que.mtt);
idx_que           354 drivers/infiniband/hw/hns/hns_roce_srq.c 	hns_roce_buf_free(hr_dev, srq->idx_que.buf_size, &srq->idx_que.idx_buf);
idx_que           355 drivers/infiniband/hw/hns/hns_roce_srq.c 	kfree(srq->idx_que.bitmap);
idx_que           389 drivers/infiniband/hw/hns/hns_roce_srq.c 	srq->idx_que.entry_sz = HNS_ROCE_IDX_QUE_ENTRY_SZ;
idx_que           390 drivers/infiniband/hw/hns/hns_roce_srq.c 	srq->idx_que.buf_size = srq->max * srq->idx_que.entry_sz;
idx_que           392 drivers/infiniband/hw/hns/hns_roce_srq.c 	srq->idx_que.mtt.mtt_type = MTT_TYPE_IDX;
idx_que           453 drivers/infiniband/hw/hns/hns_roce_srq.c 		hns_roce_mtt_cleanup(hr_dev, &srq->idx_que.mtt);
idx_que           459 drivers/infiniband/hw/hns/hns_roce_srq.c 	ib_umem_release(srq->idx_que.umem);