Home
last modified time | relevance | path

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

12345

/linux/lib/
H A Dtest_ida.c16 static void ida_dump(struct ida *ida) { } in ida_dump() argument
18 #define IDA_BUG_ON(ida, x) do { \ argument
21 ida_dump(ida); \
31 static void ida_check_alloc(struct ida *ida) in ida_check_alloc() argument
36 IDA_BUG_ON(ida, ida_alloc(ida, GFP_KERNEL) != i); in ida_check_alloc()
38 ida_free(ida, 20); in ida_check_alloc()
39 ida_free(ida, 21); in ida_check_alloc()
41 id = ida_alloc(ida, GFP_KERNEL); in ida_check_alloc()
42 IDA_BUG_ON(ida, id < 0); in ida_check_alloc()
44 IDA_BUG_ON(ida, id != 10000); in ida_check_alloc()
[all …]
H A Didr.c382 int ida_alloc_range(struct ida *ida, unsigned int min, unsigned int max, in ida_alloc_range() argument
385 XA_STATE(xas, &ida->xa, min / IDA_BITMAP_BITS); in ida_alloc_range()
493 int ida_find_first_range(struct ida *ida, unsigned int min, unsigned int max) in ida_find_first_range() argument
508 xa_lock_irqsave(&ida->xa, flags); in ida_find_first_range()
510 entry = xa_find(&ida->xa, &index, max / IDA_BITMAP_BITS, XA_PRESENT); in ida_find_first_range()
534 xa_unlock_irqrestore(&ida->xa, flags); in ida_find_first_range()
543 xa_unlock_irqrestore(&ida->xa, flags); in ida_find_first_range()
556 void ida_free(struct ida *ida, unsigned int id) in ida_free() argument
558 XA_STATE(xas, &ida->xa, id / IDA_BITMAP_BITS); in ida_free()
610 void ida_destroy(struct ida *ida) in ida_destroy() argument
[all …]
/linux/fs/smb/server/mgmt/
H A Dksmbd_ida.c9 int ksmbd_acquire_smb2_tid(struct ida *ida) in ksmbd_acquire_smb2_tid() argument
11 return ida_alloc_range(ida, 1, 0xFFFFFFFE, KSMBD_DEFAULT_GFP); in ksmbd_acquire_smb2_tid()
14 int ksmbd_acquire_smb2_uid(struct ida *ida) in ksmbd_acquire_smb2_uid() argument
18 id = ida_alloc_min(ida, 1, KSMBD_DEFAULT_GFP); in ksmbd_acquire_smb2_uid()
20 id = ida_alloc_min(ida, 1, KSMBD_DEFAULT_GFP); in ksmbd_acquire_smb2_uid()
25 int ksmbd_acquire_async_msg_id(struct ida *ida) in ksmbd_acquire_async_msg_id() argument
27 return ida_alloc_min(ida, 1, KSMBD_DEFAULT_GFP); in ksmbd_acquire_async_msg_id()
30 int ksmbd_acquire_id(struct ida *ida) in ksmbd_acquire_id() argument
32 return ida_alloc(ida, KSMBD_DEFAULT_GFP); in ksmbd_acquire_id()
35 void ksmbd_release_id(struct ida *ida, int id) in ksmbd_release_id() argument
[all …]
H 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/
H A Didr.h263 struct ida { struct
272 #define DEFINE_IDA(name) struct ida name = IDA_INIT(name) argument
274 int ida_alloc_range(struct ida *, unsigned int min, unsigned int max, gfp_t);
275 void ida_free(struct ida *, unsigned int id);
276 void ida_destroy(struct ida *ida);
277 int ida_find_first_range(struct ida *ida, unsigned int min, unsigned int max);
291 static inline int ida_alloc(struct ida *ida, gfp_t gfp) in ida_alloc() argument
293 return ida_alloc_range(ida, 0, ~0, gfp); in ida_alloc()
309 static inline int ida_alloc_min(struct ida *ida, unsigned int min, gfp_t gfp) in ida_alloc_min() argument
311 return ida_alloc_range(ida, min, ~0, gfp); in ida_alloc_min()
[all …]
H A Dthunderbolt.h261 struct ida service_ids;
262 struct ida in_hopids;
263 struct ida out_hopids;
504 struct ida msix_ida;
H A Dintel_vsec.h140 struct ida *ida; member
/linux/tools/testing/radix-tree/
H A Didr-test.c451 void ida_dump(struct ida *);
463 DEFINE_IDA(ida); in ida_check_nomem()
466 id = ida_alloc_min(&ida, 256, GFP_NOWAIT); in ida_check_nomem()
467 IDA_BUG_ON(&ida, id != -ENOMEM); in ida_check_nomem()
468 id = ida_alloc_min(&ida, 1UL << 30, GFP_NOWAIT); in ida_check_nomem()
469 IDA_BUG_ON(&ida, id != -ENOMEM); in ida_check_nomem()
470 IDA_BUG_ON(&ida, !ida_is_empty(&ida)); in ida_check_nomem()
478 DEFINE_IDA(ida); in ida_check_conv_user()
482 int id = ida_alloc(&ida, GFP_NOWAIT); in ida_check_conv_user()
484 IDA_BUG_ON(&ida, ((i % IDA_BITMAP_BITS) != in ida_check_conv_user()
[all …]
/linux/drivers/infiniband/hw/hns/
H A Dhns_roce_pd.c39 ida_init(&pd_ida->ida); in hns_roce_init_pd_table()
53 id = ida_alloc_range(&pd_ida->ida, pd_ida->min, pd_ida->max, in hns_roce_alloc_pd()
67 ida_free(&pd_ida->ida, id); in hns_roce_alloc_pd()
79 ida_free(&hr_dev->pd_ida.ida, (int)to_hr_pd(pd)->pdn); in hns_roce_dealloc_pd()
90 id = ida_alloc_range(&uar_ida->ida, uar_ida->min, uar_ida->max, in hns_roce_uar_alloc()
115 ida_init(&uar_ida->ida); in hns_roce_init_uar_table()
125 id = ida_alloc_range(&xrcd_ida->ida, xrcd_ida->min, xrcd_ida->max, in hns_roce_xrcd_alloc()
140 ida_init(&xrcd_ida->ida); in hns_roce_init_xrcd_table()
170 ida_free(&hr_dev->xrcd_ida.ida, (int)xrcdn); in hns_roce_dealloc_xrcd()
H A Dhns_roce_alloc.c176 ida_destroy(&hr_dev->xrcd_ida.ida); in hns_roce_cleanup_bitmap()
179 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()
H A Dhns_roce_cq.c124 id = ida_alloc_range(&bank->ida, bank->min, bank->max, GFP_KERNEL); in alloc_cqn()
151 ida_free(&bank->ida, cqn >> CQ_BANKID_SHIFT); in free_cqn()
583 ida_init(&cq_table->bank[i].ida); in hns_roce_init_cq_table()
599 ida_destroy(&hr_dev->cq_table.bank[i].ida); in hns_roce_cleanup_cq_table()
/linux/drivers/dax/
H A Ddax-private.h37 struct ida ida; member
90 struct ida ida; member
/linux/include/linux/mfd/
H A Dnct6694.h85 struct ida gpio_ida;
86 struct ida i2c_ida;
87 struct ida canfd_ida;
88 struct ida wdt_ida;
/linux/drivers/net/ethernet/mellanox/mlx5/core/lib/
H 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/thermal/testing/
H A Dzone.c46 struct ida ida; member
146 ida_free(&tt_zone->ida, tt_trip->id); in tt_zone_free_trips()
155 ida_destroy(&tt_zone->ida); in tt_zone_free()
199 ida_init(&tt_zone->ida); in tt_add_tz()
344 id = ida_alloc(&tt_zone->ida, GFP_KERNEL); in tt_zone_add_trip()
/linux/drivers/usb/typec/
H A Dclass.h17 struct ida mode_ids;
35 struct ida mode_ids;
52 struct ida mode_ids;
/linux/drivers/greybus/
H 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/pci/
H A Dide.c197 struct ida *ida; member
203 ida_free(stream->ida, stream->stream_index); in free_stream_index()
207 static struct stream_index *alloc_stream_index(struct ida *ida, u16 max, in DEFINE_FREE()
215 id = ida_alloc_max(ida, max - 1, GFP_KERNEL); in DEFINE_FREE()
220 .ida = ida, in DEFINE_FREE()
/linux/drivers/hwmon/
H A Dcoretemp.c95 struct ida ida; member
510 tdata->index = ida_alloc_max(&pdata->ida, pdata->nr_cores - 1, GFP_KERNEL); in init_temp_data()
536 ida_free(&pdata->ida, tdata->index); in destroy_temp_data()
633 ida_init(&pdata->ida); in coretemp_device_add()
661 ida_destroy(&pdata->ida); in coretemp_device_remove()
/linux/include/media/
H A Dmedia-device.h23 struct ida;
163 struct ida entity_internal_idx;
/linux/arch/powerpc/platforms/powernv/
H 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()
/linux/drivers/pnp/
H 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/drivers/net/ipvlan/
H A Dipvlan.h100 struct ida ida; member
/linux/drivers/thermal/
H A Dthermal_core.h145 struct ida ida; member
/linux/drivers/perf/
H A Dfsl_imx8_ddr_perf.c784 struct ida *ida; in ddr_perf_probe() local
811 ida = pmu->devtype_data->type == DDR_PERF_TYPE ? &ddr_ida : &db_ida; in ddr_perf_probe()
812 num = ida_alloc(ida, GFP_KERNEL); in ddr_perf_probe()
884 ida_free(ida, pmu->id); in ddr_perf_probe()

12345