Home
last modified time | relevance | path

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

123

/Linux-v4.19/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.c366 static int ida_get_new_above(struct ida *ida, int start) in ida_get_new_above() argument
368 struct radix_tree_root *root = &ida->ida_rt; in ida_get_new_above()
450 static void ida_remove(struct ida *ida, int id) in ida_remove() argument
459 slot = radix_tree_iter_lookup(&ida->ida_rt, &iter, index); in ida_remove()
476 radix_tree_iter_tag_set(&ida->ida_rt, &iter, IDR_FREE); in ida_remove()
480 radix_tree_iter_delete(&ida->ida_rt, &iter, slot); in ida_remove()
483 radix_tree_iter_delete(&ida->ida_rt, &iter, slot); in ida_remove()
501 void ida_destroy(struct ida *ida) in ida_destroy() argument
507 xa_lock_irqsave(&ida->ida_rt, flags); in ida_destroy()
508 radix_tree_for_each_slot(slot, &ida->ida_rt, &iter, 0) { in ida_destroy()
[all …]
/Linux-v4.19/include/linux/
Didr.h230 struct ida { struct
237 #define DEFINE_IDA(name) struct ida name = IDA_INIT(name)
239 int ida_alloc_range(struct ida *, unsigned int min, unsigned int max, gfp_t);
240 void ida_free(struct ida *, unsigned int id);
241 void ida_destroy(struct ida *ida);
254 static inline int ida_alloc(struct ida *ida, gfp_t gfp) in ida_alloc() argument
256 return ida_alloc_range(ida, 0, ~0, gfp); in ida_alloc()
271 static inline int ida_alloc_min(struct ida *ida, unsigned int min, gfp_t gfp) in ida_alloc_min() argument
273 return ida_alloc_range(ida, min, ~0, gfp); in ida_alloc_min()
288 static inline int ida_alloc_max(struct ida *ida, unsigned int max, gfp_t gfp) in ida_alloc_max() argument
[all …]
Dnfs_fs_sb.h207 struct ida openowner_id;
208 struct ida lockowner_id;
Dthermal.h217 struct ida ida; member
Dthunderbolt.h230 struct ida service_ids;
443 struct ida msix_ida;
/Linux-v4.19/tools/testing/radix-tree/
Didr-test.c317 void ida_dump(struct ida *);
329 DEFINE_IDA(ida); in ida_check_nomem()
332 id = ida_alloc_min(&ida, 256, GFP_NOWAIT); in ida_check_nomem()
333 IDA_BUG_ON(&ida, id != -ENOMEM); in ida_check_nomem()
334 id = ida_alloc_min(&ida, 1UL << 30, GFP_NOWAIT); in ida_check_nomem()
335 IDA_BUG_ON(&ida, id != -ENOMEM); in ida_check_nomem()
336 IDA_BUG_ON(&ida, !ida_is_empty(&ida)); in ida_check_nomem()
344 DEFINE_IDA(ida); in ida_check_conv_user()
349 int id = ida_alloc(&ida, GFP_NOWAIT); in ida_check_conv_user()
351 IDA_BUG_ON(&ida, (i % IDA_BITMAP_BITS) != in ida_check_conv_user()
[all …]
/Linux-v4.19/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()
/Linux-v4.19/drivers/dax/
Ddax-private.h31 struct ida ida; member
Ddevice.c131 ida_init(&dax_region->ida); in alloc_dax_region()
586 ida_simple_remove(&dax_region->ida, dev_dax->id); in dev_dax_release()
648 id = ida_simple_get(&dax_region->ida, 0, 0, GFP_KERNEL); in devm_create_dev_dax()
705 ida_simple_remove(&dax_region->ida, dev_dax->id); in devm_create_dev_dax()
/Linux-v4.19/drivers/staging/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()
Dhd.h48 struct ida cport_id_map;
/Linux-v4.19/include/media/
Dmedia-device.h28 struct ida;
140 struct ida entity_internal_idx;
/Linux-v4.19/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()
/Linux-v4.19/drivers/nvdimm/
Dnd.h144 struct ida ns_ida;
145 struct ida btt_ida;
146 struct ida pfn_ida;
147 struct ida dax_ida;
/Linux-v4.19/drivers/net/ipvlan/
Dipvlan.h105 struct ida ida; member
Dipvlan_main.c145 ida_init(&port->ida); in ipvlan_port_create()
176 ida_destroy(&port->ida); in ipvlan_port_destroy()
650 err = ida_simple_get(&port->ida, port->dev_id_start, 0xFFFE, in ipvlan_link_new()
653 err = ida_simple_get(&port->ida, 0x1, port->dev_id_start, in ipvlan_link_new()
686 ida_simple_remove(&port->ida, dev->dev_id); in ipvlan_link_new()
706 ida_simple_remove(&ipvlan->port->ida, dev->dev_id); in ipvlan_link_delete()
/Linux-v4.19/arch/powerpc/platforms/powernv/
Dvas-window.c518 static void vas_release_window_id(struct ida *ida, int winid) in vas_release_window_id() argument
520 ida_free(ida, winid); in vas_release_window_id()
523 static int vas_assign_window_id(struct ida *ida) in vas_assign_window_id() argument
525 int winid = ida_alloc_max(ida, VAS_WINDOWS_PER_CHIP - 1, GFP_KERNEL); in vas_assign_window_id()
546 vas_release_window_id(&vinst->ida, winid); in vas_window_free()
554 winid = vas_assign_window_id(&vinst->ida); in vas_window_alloc()
574 vas_release_window_id(&vinst->ida, winid); in vas_window_alloc()
Dvas.h311 struct ida ida; member
/Linux-v4.19/drivers/net/ethernet/netronome/nfp/flower/
Dmain.h123 struct ida ida_handle;
186 struct ida nfp_mac_off_ids;
/Linux-v4.19/drivers/target/iscsi/
Discsi_target.h58 extern struct ida sess_ida;
/Linux-v4.19/drivers/misc/mic/host/
Dmic_intr.h86 struct ida cb_ida;
/Linux-v4.19/drivers/gpu/drm/
Ddrm_connector.c65 struct ida ida; member
98 ida_init(&drm_connector_enum_list[i].ida); in drm_connector_ida_init()
106 ida_destroy(&drm_connector_enum_list[i].ida); in drm_connector_ida_destroy()
196 struct ida *connector_ida = in drm_connector_init()
197 &drm_connector_enum_list[connector_type].ida; in drm_connector_init()
392 ida_simple_remove(&drm_connector_enum_list[connector->connector_type].ida, in drm_connector_cleanup()
/Linux-v4.19/drivers/net/ethernet/mellanox/mlx5/core/en_accel/
Dipsec.h83 struct ida halloc;
/Linux-v4.19/drivers/gpu/drm/vmwgfx/
Dvmwgfx_gmrid_manager.c41 struct ida gmr_ida;

123