Lines Matching refs:bmap

39 			struct qed_bmap *bmap, u32 max_count, char *name)
43 bmap->max_count = max_count;
45 bmap->bitmap = bitmap_zalloc(max_count, GFP_KERNEL);
46 if (!bmap->bitmap)
49 snprintf(bmap->name, QED_RDMA_MAX_BMAP_NAME, "%s", name);
56 struct qed_bmap *bmap, u32 *id_num)
58 *id_num = find_first_zero_bit(bmap->bitmap, bmap->max_count);
59 if (*id_num >= bmap->max_count)
62 __set_bit(*id_num, bmap->bitmap);
65 bmap->name, *id_num);
71 struct qed_bmap *bmap, u32 id_num)
73 if (id_num >= bmap->max_count)
76 __set_bit(id_num, bmap->bitmap);
80 struct qed_bmap *bmap, u32 id_num)
84 if (id_num >= bmap->max_count)
87 b_acquired = test_and_clear_bit(id_num, bmap->bitmap);
90 bmap->name, id_num);
95 bmap->name, id_num);
99 struct qed_bmap *bmap, u32 id_num)
101 if (id_num >= bmap->max_count)
104 return test_bit(id_num, bmap->bitmap);
107 static bool qed_bmap_is_empty(struct qed_bmap *bmap)
109 return bitmap_empty(bmap->bitmap, bmap->max_count);
221 * Size needs to equal the size of the cq bmap.
319 struct qed_bmap *bmap, bool check)
327 weight = bitmap_weight(bmap->bitmap, bmap->max_count);
333 bmap->name, bmap->max_count, weight);
335 for (bit = 0; bit < bmap->max_count; bit += 512) {
336 b = bmap->bitmap + BITS_TO_LONGS(bit);
337 nbits = min(bmap->max_count - bit, 512U);
345 bitmap_free(bmap->bitmap);
346 bmap->bitmap = NULL;
1725 struct qed_bmap *bmap;
1749 bmap = qed_rdma_get_srq_bmap(p_hwfn, in_params->is_xrc);
1753 qed_bmap_release_id(p_hwfn, bmap, in_params->srq_id - offset);
1774 struct qed_bmap *bmap;
1779 bmap = qed_rdma_get_srq_bmap(p_hwfn, in_params->is_xrc);
1781 rc = qed_rdma_bmap_alloc_id(p_hwfn, bmap, &returned_id);
1842 qed_bmap_release_id(p_hwfn, bmap, returned_id);