/Linux-v4.19/lib/ |
D | test_ida.c | 16 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 …]
|
D | idr.c | 366 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/ |
D | idr.h | 230 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 …]
|
D | nfs_fs_sb.h | 207 struct ida openowner_id; 208 struct ida lockowner_id;
|
D | thermal.h | 217 struct ida ida; member
|
D | thunderbolt.h | 230 struct ida service_ids; 443 struct ida msix_ida;
|
/Linux-v4.19/tools/testing/radix-tree/ |
D | idr-test.c | 317 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/ |
D | gid.c | 43 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/ |
D | dax-private.h | 31 struct ida ida; member
|
D | device.c | 131 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/ |
D | hd.c | 22 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()
|
D | hd.h | 48 struct ida cport_id_map;
|
/Linux-v4.19/include/media/ |
D | media-device.h | 28 struct ida; 140 struct ida entity_internal_idx;
|
/Linux-v4.19/drivers/pnp/ |
D | driver.c | 16 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/ |
D | nd.h | 144 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/ |
D | ipvlan.h | 105 struct ida ida; member
|
D | ipvlan_main.c | 145 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/ |
D | vas-window.c | 518 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()
|
D | vas.h | 311 struct ida ida; member
|
/Linux-v4.19/drivers/net/ethernet/netronome/nfp/flower/ |
D | main.h | 123 struct ida ida_handle; 186 struct ida nfp_mac_off_ids;
|
/Linux-v4.19/drivers/target/iscsi/ |
D | iscsi_target.h | 58 extern struct ida sess_ida;
|
/Linux-v4.19/drivers/misc/mic/host/ |
D | mic_intr.h | 86 struct ida cb_ida;
|
/Linux-v4.19/drivers/gpu/drm/ |
D | drm_connector.c | 65 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/ |
D | ipsec.h | 83 struct ida halloc;
|
/Linux-v4.19/drivers/gpu/drm/vmwgfx/ |
D | vmwgfx_gmrid_manager.c | 41 struct ida gmr_ida;
|