Home
last modified time | relevance | path

Searched refs:res_cb (Results 1 – 5 of 5) sorted by relevance

/linux-6.12.1/drivers/infiniband/hw/erdma/
Derdma_main.c416 dev->res_cb[ERDMA_RES_TYPE_PD].max_cap = ERDMA_MAX_PD; in erdma_dev_attrs_init()
417 dev->res_cb[ERDMA_RES_TYPE_STAG_IDX].max_cap = dev->attrs.max_mr; in erdma_dev_attrs_init()
452 dev->res_cb[i].next_alloc_idx = 1; in erdma_res_cb_init()
453 spin_lock_init(&dev->res_cb[i].lock); in erdma_res_cb_init()
454 dev->res_cb[i].bitmap = in erdma_res_cb_init()
455 bitmap_zalloc(dev->res_cb[i].max_cap, GFP_KERNEL); in erdma_res_cb_init()
456 if (!dev->res_cb[i].bitmap) in erdma_res_cb_init()
464 bitmap_free(dev->res_cb[j].bitmap); in erdma_res_cb_init()
474 bitmap_free(dev->res_cb[i].bitmap); in erdma_res_cb_free()
Derdma_verbs.c246 static int erdma_alloc_idx(struct erdma_resource_cb *res_cb) in erdma_alloc_idx() argument
251 spin_lock_irqsave(&res_cb->lock, flags); in erdma_alloc_idx()
252 idx = find_next_zero_bit(res_cb->bitmap, res_cb->max_cap, in erdma_alloc_idx()
253 res_cb->next_alloc_idx); in erdma_alloc_idx()
254 if (idx == res_cb->max_cap) { in erdma_alloc_idx()
255 idx = find_first_zero_bit(res_cb->bitmap, res_cb->max_cap); in erdma_alloc_idx()
256 if (idx == res_cb->max_cap) { in erdma_alloc_idx()
257 res_cb->next_alloc_idx = 1; in erdma_alloc_idx()
258 spin_unlock_irqrestore(&res_cb->lock, flags); in erdma_alloc_idx()
263 set_bit(idx, res_cb->bitmap); in erdma_alloc_idx()
[all …]
Derdma.h206 struct erdma_resource_cb res_cb[ERDMA_RES_CNT]; member
/linux-6.12.1/drivers/net/ethernet/hisilicon/hns/
Dhnae.h640 struct hnae_desc_cb *res_cb) in hnae_replace_buffer() argument
645 ring->desc_cb[i] = *res_cb; in hnae_replace_buffer()
/linux-6.12.1/drivers/net/ethernet/hisilicon/hns3/
Dhns3_enet.c3553 struct hns3_desc_cb *res_cb) in hns3_replace_buffer() argument
3556 ring->desc_cb[i] = *res_cb; in hns3_replace_buffer()