Home
last modified time | relevance | path

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

123

/kernel/linux/linux-5.10/lib/
Dtest_ida.c16 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 …]
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()
541 void ida_destroy(struct ida *ida) in ida_destroy() argument
543 XA_STATE(xas, &ida->xa, 0); in ida_destroy()
592 static void ida_dump(struct ida *ida) in ida_dump() argument
594 struct xarray *xa = &ida->xa; in ida_dump()
595 pr_debug("ida: %p node %p free %d\n", ida, xa->xa_head, in ida_dump()
/kernel/linux/linux-5.10/include/linux/
Didr.h244 struct ida { struct
253 #define DEFINE_IDA(name) struct ida name = IDA_INIT(name) argument
255 int ida_alloc_range(struct ida *, unsigned int min, unsigned int max, gfp_t);
256 void ida_free(struct ida *, unsigned int id);
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
291 return ida_alloc_range(ida, min, ~0, gfp); in ida_alloc_min()
307 static inline int ida_alloc_max(struct ida *ida, unsigned int max, gfp_t gfp) in ida_alloc_max() argument
[all …]
Dnfs_fs_sb.h227 struct ida openowner_id;
228 struct ida lockowner_id;
Dthermal.h177 struct ida ida; member
/kernel/linux/linux-5.10/tools/testing/radix-tree/
Didr-test.c420 void ida_dump(struct ida *);
432 DEFINE_IDA(ida); in ida_check_nomem()
435 id = ida_alloc_min(&ida, 256, GFP_NOWAIT); in ida_check_nomem()
436 IDA_BUG_ON(&ida, id != -ENOMEM); in ida_check_nomem()
437 id = ida_alloc_min(&ida, 1UL << 30, GFP_NOWAIT); in ida_check_nomem()
438 IDA_BUG_ON(&ida, id != -ENOMEM); in ida_check_nomem()
439 IDA_BUG_ON(&ida, !ida_is_empty(&ida)); in ida_check_nomem()
447 DEFINE_IDA(ida); in ida_check_conv_user()
451 int id = ida_alloc(&ida, GFP_NOWAIT); in ida_check_conv_user()
453 IDA_BUG_ON(&ida, ((i % IDA_BITMAP_BITS) != in ida_check_conv_user()
[all …]
/kernel/linux/linux-5.10/drivers/dax/
Ddax-private.h37 struct ida ida; member
68 struct ida ida; member
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx5/core/lib/
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()
99 index = ida_simple_get(&dev->roce.reserved_gids.ida, in mlx5_core_reserved_gid_alloc()
113 ida_simple_remove(&dev->roce.reserved_gids.ida, gid_index); in mlx5_core_reserved_gid_free()
/kernel/linux/linux-5.10/drivers/greybus/
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()
/kernel/linux/linux-5.10/drivers/hwmon/
Dcoretemp.c92 struct ida ida; member
470 index = ida_alloc(&pdata->ida, GFP_KERNEL); in create_core_data()
524 ida_free(&pdata->ida, index); in create_core_data()
550 ida_free(&pdata->ida, indx - BASE_SYSFS_ATTR_NO); in coretemp_remove_core()
565 ida_init(&pdata->ida); in coretemp_device_add()
593 ida_destroy(&pdata->ida); in coretemp_device_remove()
/kernel/linux/linux-5.10/include/media/
Dmedia-device.h20 struct ida;
158 struct ida entity_internal_idx;
/kernel/linux/linux-5.10/drivers/pnp/
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()
/kernel/linux/linux-5.10/drivers/nvdimm/
Dnd.h140 struct ida ns_ida;
141 struct ida btt_ida;
142 struct ida pfn_ida;
143 struct ida dax_ida;
/kernel/linux/linux-5.10/drivers/net/ipvlan/
Dipvlan.h100 struct ida ida; member
Dipvlan_main.c77 ida_init(&port->ida); in ipvlan_port_create()
105 ida_destroy(&port->ida); in ipvlan_port_destroy()
604 err = ida_simple_get(&port->ida, port->dev_id_start, 0xFFFE, in ipvlan_link_new()
607 err = ida_simple_get(&port->ida, 0x1, port->dev_id_start, in ipvlan_link_new()
640 ida_simple_remove(&port->ida, dev->dev_id); in ipvlan_link_new()
660 ida_simple_remove(&ipvlan->port->ida, dev->dev_id); in ipvlan_link_delete()
/kernel/linux/linux-5.10/arch/powerpc/platforms/powernv/
Dvas-window.c505 static void vas_release_window_id(struct ida *ida, int winid) in vas_release_window_id() argument
507 ida_free(ida, winid); in vas_release_window_id()
510 static int vas_assign_window_id(struct ida *ida) in vas_assign_window_id() argument
512 int winid = ida_alloc_max(ida, VAS_WINDOWS_PER_CHIP - 1, GFP_KERNEL); in vas_assign_window_id()
533 vas_release_window_id(&vinst->ida, winid); in vas_window_free()
541 winid = vas_assign_window_id(&vinst->ida); in vas_window_alloc()
561 vas_release_window_id(&vinst->ida, winid); in vas_window_alloc()
Dvas.h321 struct ida ida; member
/kernel/linux/linux-5.10/drivers/staging/media/atomisp/pci/
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()
Datomisp_subdev.h331 struct ida ida; member
/kernel/linux/linux-5.10/drivers/target/iscsi/
Discsi_target.h57 extern struct ida sess_ida;
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx5/core/en_accel/
Dipsec.h86 struct ida halloc;
/kernel/linux/linux-5.10/drivers/gpu/drm/
Ddrm_connector.c70 struct ida ida; member
104 ida_init(&drm_connector_enum_list[i].ida); in drm_connector_ida_init()
112 ida_destroy(&drm_connector_enum_list[i].ida); in drm_connector_ida_destroy()
224 struct ida *connector_ida = in drm_connector_init()
225 &drm_connector_enum_list[connector_type].ida; in drm_connector_init()
464 ida_simple_remove(&drm_connector_enum_list[connector->connector_type].ida, in drm_connector_cleanup()
/kernel/linux/linux-5.10/drivers/media/platform/coda/
Dcoda.h93 struct ida ida; member
/kernel/linux/linux-5.10/drivers/net/ethernet/netronome/nfp/flower/
Dmain.h102 struct ida mac_off_ids;
139 struct ida ida_handle;
/kernel/linux/linux-5.10/include/linux/greybus/
Dhd.h51 struct ida cport_id_map;

123