Home
last modified time | relevance | path

Searched refs:ida (Results 1 – 25 of 86) sorted by relevance

1234

/linux/lib/
A Dtest_ida.c16 void ida_dump(struct ida *ida) { } in ida_dump() argument
31 static void ida_check_alloc(struct ida *ida) in ida_check_alloc() argument
53 IDA_BUG_ON(ida, !ida_is_empty(ida)); in ida_check_alloc()
60 IDA_BUG_ON(ida, ida_is_empty(ida)); in ida_check_destroy_1()
62 IDA_BUG_ON(ida, !ida_is_empty(ida)); in ida_check_destroy_1()
69 IDA_BUG_ON(ida, !ida_is_empty(ida)); in ida_check_destroy()
71 IDA_BUG_ON(ida, !ida_is_empty(ida)); in ida_check_destroy()
94 IDA_BUG_ON(ida, !ida_is_empty(ida)); in ida_check_leaf()
97 IDA_BUG_ON(ida, ida_is_empty(ida)); in ida_check_leaf()
99 IDA_BUG_ON(ida, !ida_is_empty(ida)); in ida_check_leaf()
[all …]
A Didr.c380 int ida_alloc_range(struct ida *ida, unsigned int min, unsigned int max, in ida_alloc_range() argument
383 XA_STATE(xas, &ida->xa, min / IDA_BITMAP_BITS); in ida_alloc_range()
487 void ida_free(struct ida *ida, unsigned int id) in ida_free() argument
489 XA_STATE(xas, &ida->xa, id / IDA_BITMAP_BITS); in ida_free()
540 void ida_destroy(struct ida *ida) in ida_destroy() argument
542 XA_STATE(xas, &ida->xa, 0); in ida_destroy()
591 static void ida_dump(struct ida *ida) in ida_dump() argument
593 struct xarray *xa = &ida->xa; in ida_dump()
594 pr_debug("ida: %p node %p free %d\n", ida, xa->xa_head, in ida_dump()
/linux/fs/ksmbd/mgmt/
A Dksmbd_ida.c8 static inline int __acquire_id(struct ida *ida, int from, int to) in __acquire_id() argument
13 int ksmbd_acquire_smb2_tid(struct ida *ida) in ksmbd_acquire_smb2_tid() argument
22 int ksmbd_acquire_smb2_uid(struct ida *ida) in ksmbd_acquire_smb2_uid() argument
26 id = __acquire_id(ida, 1, 0); in ksmbd_acquire_smb2_uid()
28 id = __acquire_id(ida, 1, 0); in ksmbd_acquire_smb2_uid()
33 int ksmbd_acquire_async_msg_id(struct ida *ida) in ksmbd_acquire_async_msg_id() argument
35 return __acquire_id(ida, 1, 0); in ksmbd_acquire_async_msg_id()
38 int ksmbd_acquire_id(struct ida *ida) in ksmbd_acquire_id() argument
40 return __acquire_id(ida, 0, 0); in ksmbd_acquire_id()
43 void ksmbd_release_id(struct ida *ida, int id) in ksmbd_release_id() argument
[all …]
A Dksmbd_ida.h19 int ksmbd_acquire_smb2_tid(struct ida *ida);
28 int ksmbd_acquire_smb2_uid(struct ida *ida);
29 int ksmbd_acquire_async_msg_id(struct ida *ida);
31 int ksmbd_acquire_id(struct ida *ida);
33 void ksmbd_release_id(struct ida *ida, int id);
/linux/include/linux/
A Didr.h244 struct ida { struct
257 void ida_destroy(struct ida *ida);
271 static inline int ida_alloc(struct ida *ida, gfp_t gfp) in ida_alloc() argument
273 return ida_alloc_range(ida, 0, ~0, gfp); in ida_alloc()
289 static inline int ida_alloc_min(struct ida *ida, unsigned int min, gfp_t gfp) in ida_alloc_min() argument
307 static inline int ida_alloc_max(struct ida *ida, unsigned int max, gfp_t gfp) in ida_alloc_max() argument
312 static inline void ida_init(struct ida *ida) in ida_init() argument
314 xa_init_flags(&ida->xa, IDA_INIT_FLAGS); in ida_init()
323 #define ida_simple_remove(ida, id) ida_free(ida, id) argument
325 static inline bool ida_is_empty(const struct ida *ida) in ida_is_empty() argument
[all …]
A Dthunderbolt.h239 struct ida service_ids;
240 struct ida in_hopids;
241 struct ida out_hopids;
480 struct ida msix_ida;
A Dnfs_fs_sb.h234 struct ida openowner_id;
235 struct ida lockowner_id;
A Dthermal.h172 struct ida ida; member
/linux/tools/testing/radix-tree/
A Didr-test.c441 DEFINE_IDA(ida); in ida_check_nomem()
448 IDA_BUG_ON(&ida, !ida_is_empty(&ida)); in ida_check_nomem()
456 DEFINE_IDA(ida); in ida_check_conv_user()
472 ida_destroy(&ida); in ida_check_conv_user()
477 DEFINE_IDA(ida); in ida_check_random()
492 IDA_BUG_ON(&ida, ida_alloc_min(&ida, bit, GFP_KERNEL) in ida_check_random()
496 ida_destroy(&ida); in ida_check_random()
503 DEFINE_IDA(ida); in ida_simple_get_remove_test()
516 ida_destroy(&ida); in ida_simple_get_remove_test()
541 struct ida *ida = arg; in ida_leak_fn() local
[all …]
/linux/drivers/infiniband/hw/hns/
A Dhns_roce_pd.c41 ida_init(&pd_ida->ida); in hns_roce_init_pd_table()
55 id = ida_alloc_range(&pd_ida->ida, pd_ida->min, pd_ida->max, in hns_roce_alloc_pd()
69 ida_free(&pd_ida->ida, id); in hns_roce_alloc_pd()
81 ida_free(&hr_dev->pd_ida.ida, (int)to_hr_pd(pd)->pdn); in hns_roce_dealloc_pd()
93 id = ida_alloc_range(&uar_ida->ida, uar_ida->min, uar_ida->max, in hns_roce_uar_alloc()
110 ida_free(&uar_ida->ida, id); in hns_roce_uar_alloc()
127 ida_init(&uar_ida->ida); in hns_roce_init_uar_table()
137 id = ida_alloc_range(&xrcd_ida->ida, xrcd_ida->min, xrcd_ida->max, in hns_roce_xrcd_alloc()
152 ida_init(&xrcd_ida->ida); in hns_roce_init_xrcd_table()
178 ida_free(&hr_dev->xrcd_ida.ida, (int)xrcdn); in hns_roce_dealloc_xrcd()
A Dhns_roce_alloc.c178 ida_destroy(&hr_dev->xrcd_ida.ida); in hns_roce_cleanup_bitmap()
181 ida_destroy(&hr_dev->srq_table.srq_ida.ida); in hns_roce_cleanup_bitmap()
184 ida_destroy(&hr_dev->mr_table.mtpt_ida.ida); in hns_roce_cleanup_bitmap()
185 ida_destroy(&hr_dev->pd_ida.ida); in hns_roce_cleanup_bitmap()
186 ida_destroy(&hr_dev->uar_ida.ida); in hns_roce_cleanup_bitmap()
A Dhns_roce_srq.c89 id = ida_alloc_range(&srq_ida->ida, srq_ida->min, srq_ida->max, in alloc_srqc()
139 ida_free(&srq_ida->ida, id); in alloc_srqc()
161 ida_free(&srq_table->srq_ida.ida, (int)srq->srqn); in free_srqc()
454 ida_init(&srq_ida->ida); in hns_roce_init_srq_table()
A Dhns_roce_cq.c70 id = ida_alloc_range(&bank->ida, bank->min, bank->max, GFP_KERNEL); in alloc_cqn()
97 ida_free(&bank->ida, cqn >> CQ_BANKID_SHIFT); in free_cqn()
527 ida_init(&cq_table->bank[i].ida); in hns_roce_init_cq_table()
538 ida_destroy(&hr_dev->cq_table.bank[i].ida); in hns_roce_cleanup_cq_table()
A Dhns_roce_mr.c77 id = ida_alloc_range(&mtpt_ida->ida, mtpt_ida->min, mtpt_ida->max, in alloc_mr_key()
95 ida_free(&mtpt_ida->ida, id); in alloc_mr_key()
104 ida_free(&hr_dev->mr_table.mtpt_ida.ida, (int)obj); in free_mr_key()
204 ida_init(&mtpt_ida->ida); in hns_roce_init_mr_table()
499 ida_free(&hr_dev->mr_table.mtpt_ida.ida, in hns_roce_mw_free()
561 id = ida_alloc_range(&mtpt_ida->ida, mtpt_ida->min, mtpt_ida->max, in hns_roce_alloc_mw()
/linux/drivers/dax/
A Ddax-private.h37 struct ida ida; member
68 struct ida ida; member
/linux/drivers/net/ethernet/mellanox/mlx5/core/lib/
A Dgid.c43 ida_init(&dev->roce.reserved_gids.ida); in mlx5_init_reserved_gids()
50 WARN_ON(!ida_is_empty(&dev->roce.reserved_gids.ida)); in mlx5_cleanup_reserved_gids()
53 ida_destroy(&dev->roce.reserved_gids.ida); in mlx5_cleanup_reserved_gids()
94 index = ida_alloc_range(&dev->roce.reserved_gids.ida, in mlx5_core_reserved_gid_alloc()
108 ida_free(&dev->roce.reserved_gids.ida, gid_index); in mlx5_core_reserved_gid_free()
/linux/drivers/usb/typec/
A Dclass.h15 struct ida mode_ids;
32 struct ida mode_ids;
41 struct ida mode_ids;
/linux/drivers/greybus/
A Dhd.c22 static struct ida gb_hd_bus_id_map;
50 struct ida *id_map = &hd->cport_id_map; in gb_hd_cport_reserve()
65 struct ida *id_map = &hd->cport_id_map; in gb_hd_cport_release_reserved()
75 struct ida *id_map = &hd->cport_id_map; in gb_hd_cport_allocate()
/linux/drivers/pnp/
A Ddriver.c16 static int compare_func(const char *ida, const char *idb) in compare_func() argument
22 if (ida[i] != 'X' && in compare_func()
23 idb[i] != 'X' && toupper(ida[i]) != toupper(idb[i])) in compare_func()
/linux/include/media/
A Dmedia-device.h20 struct ida;
158 struct ida entity_internal_idx;
/linux/arch/powerpc/platforms/powernv/
A Dvas-window.c506 static void vas_release_window_id(struct ida *ida, int winid) in vas_release_window_id() argument
508 ida_free(ida, winid); in vas_release_window_id()
511 static int vas_assign_window_id(struct ida *ida) in vas_assign_window_id() argument
513 int winid = ida_alloc_max(ida, VAS_WINDOWS_PER_CHIP - 1, GFP_KERNEL); in vas_assign_window_id()
534 vas_release_window_id(&vinst->ida, winid); in vas_window_free()
542 winid = vas_assign_window_id(&vinst->ida); in vas_window_alloc()
562 vas_release_window_id(&vinst->ida, winid); in vas_window_alloc()
A Dvas.h321 struct ida ida; member
/linux/drivers/net/ipvlan/
A Dipvlan.h100 struct ida ida; member
A Dipvlan_main.c79 ida_init(&port->ida); in ipvlan_port_create()
107 ida_destroy(&port->ida); in ipvlan_port_destroy()
606 err = ida_simple_get(&port->ida, port->dev_id_start, 0xFFFE, in ipvlan_link_new()
609 err = ida_simple_get(&port->ida, 0x1, port->dev_id_start, in ipvlan_link_new()
642 ida_simple_remove(&port->ida, dev->dev_id); in ipvlan_link_new()
662 ida_simple_remove(&ipvlan->port->ida, dev->dev_id); in ipvlan_link_delete()
/linux/drivers/staging/media/atomisp/pci/
A Datomisp_acc.c114 ida_destroy(&isp->asd[i].acc.ida); in atomisp_acc_cleanup()
129 ida_free(&asd->acc.ida, acc_fw->handle); in atomisp_acc_release()
179 handle = ida_alloc(&asd->acc.ida, GFP_KERNEL); in atomisp_acc_load_to_pipe()
238 ida_free(&asd->acc.ida, acc_fw->handle); in atomisp_acc_unload()

Completed in 56 milliseconds

1234