Lines Matching refs:cq_table

90 	struct hns_roce_cq_table *cq_table;  in hns_roce_cq_alloc()  local
96 cq_table = &hr_dev->cq_table; in hns_roce_cq_alloc()
117 ret = hns_roce_bitmap_alloc(&cq_table->bitmap, &hr_cq->cqn); in hns_roce_cq_alloc()
124 ret = hns_roce_table_get(hr_dev, &cq_table->table, hr_cq->cqn); in hns_roce_cq_alloc()
131 spin_lock_irq(&cq_table->lock); in hns_roce_cq_alloc()
133 ret = radix_tree_insert(&cq_table->tree, hr_cq->cqn, hr_cq); in hns_roce_cq_alloc()
134 spin_unlock_irq(&cq_table->lock); in hns_roce_cq_alloc()
168 spin_lock_irq(&cq_table->lock); in hns_roce_cq_alloc()
169 radix_tree_delete(&cq_table->tree, hr_cq->cqn); in hns_roce_cq_alloc()
170 spin_unlock_irq(&cq_table->lock); in hns_roce_cq_alloc()
173 hns_roce_table_put(hr_dev, &cq_table->table, hr_cq->cqn); in hns_roce_cq_alloc()
176 hns_roce_bitmap_free(&cq_table->bitmap, hr_cq->cqn, BITMAP_NO_RR); in hns_roce_cq_alloc()
191 struct hns_roce_cq_table *cq_table = &hr_dev->cq_table; in hns_roce_free_cq() local
208 spin_lock_irq(&cq_table->lock); in hns_roce_free_cq()
209 radix_tree_delete(&cq_table->tree, hr_cq->cqn); in hns_roce_free_cq()
210 spin_unlock_irq(&cq_table->lock); in hns_roce_free_cq()
212 hns_roce_table_put(hr_dev, &cq_table->table, hr_cq->cqn); in hns_roce_free_cq()
213 hns_roce_bitmap_free(&cq_table->bitmap, hr_cq->cqn, BITMAP_NO_RR); in hns_roce_free_cq()
493 cq = radix_tree_lookup(&hr_dev->cq_table.tree, in hns_roce_cq_completion()
507 struct hns_roce_cq_table *cq_table = &hr_dev->cq_table; in hns_roce_cq_event() local
511 cq = radix_tree_lookup(&cq_table->tree, in hns_roce_cq_event()
530 struct hns_roce_cq_table *cq_table = &hr_dev->cq_table; in hns_roce_init_cq_table() local
532 spin_lock_init(&cq_table->lock); in hns_roce_init_cq_table()
533 INIT_RADIX_TREE(&cq_table->tree, GFP_ATOMIC); in hns_roce_init_cq_table()
535 return hns_roce_bitmap_init(&cq_table->bitmap, hr_dev->caps.num_cqs, in hns_roce_init_cq_table()
542 hns_roce_bitmap_cleanup(&hr_dev->cq_table.bitmap); in hns_roce_cleanup_cq_table()