| /linux/fs/smb/server/mgmt/ |
| H A D | ksmbd_ida.c | 9 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 D | ksmbd_ida.h | 19 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 D | idr.h | 263 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 …]
|
| /linux/tools/testing/radix-tree/ |
| H A D | idr-test.c | 451 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/lib/ |
| H A D | idr.c | 382 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/drivers/net/ethernet/mellanox/mlx5/core/lib/ |
| H A 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() 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/greybus/ |
| H A 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()
|
| /linux/drivers/net/ipvlan/ |
| H A D | ipvlan.h | 100 struct ida ida; member
|
| H A D | ipvlan_main.c | 81 ida_init(&port->ida); in ipvlan_port_create() 110 ida_destroy(&port->ida); in ipvlan_port_destroy() 613 err = ida_alloc_range(&port->ida, port->dev_id_start, 0xFFFD, in ipvlan_link_new() 616 err = ida_alloc_range(&port->ida, 0x1, port->dev_id_start - 1, in ipvlan_link_new() 649 ida_free(&port->ida, dev->dev_id); in ipvlan_link_new() 669 ida_free(&ipvlan->port->ida, dev->dev_id); in ipvlan_link_delete()
|
| /linux/drivers/pnp/ |
| H A 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/arch/powerpc/platforms/powernv/ |
| H A D | vas-window.c | 506 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()
|
| H A D | vas.h | 321 struct ida ida; member
|
| H A D | vas.c | 88 ida_init(&vinst->ida); in init_vas_instance()
|
| /linux/drivers/target/iscsi/ |
| H A D | iscsi_target.h | 54 extern struct ida sess_ida;
|
| /linux/drivers/tty/serial/ |
| H A D | serial_base.h | 19 struct ida port_ida;
|
| /linux/sound/soc/sof/ |
| H A D | ipc4-priv.h | 39 struct ida m_ida;
|
| H A D | sof-audio.h | 501 struct ida output_queue_ida; 502 struct ida input_queue_ida;
|
| /linux/drivers/net/ethernet/mellanox/mlxsw/ |
| H A D | spectrum_acl_tcam.h | 16 struct ida used_regions; 18 struct ida used_groups;
|
| /linux/include/linux/greybus/ |
| H A D | hd.h | 51 struct ida cport_id_map;
|
| H A D | svc.h | 45 struct ida device_id_map;
|
| /linux/drivers/media/platform/chips-media/coda/ |
| H A D | coda.h | 101 struct ida ida; member
|
| /linux/drivers/resctrl/ |
| H A D | mpam_internal.h | 308 struct ida ida_csu_mon; 309 struct ida ida_mbwu_mon;
|
| /linux/drivers/gpu/drm/vmwgfx/ |
| H A D | vmwgfx_gmrid_manager.c | 40 struct ida gmr_ida;
|
| /linux/drivers/net/ethernet/netronome/nfp/flower/ |
| H A D | main.h | 104 struct ida mac_off_ids; 237 struct ida ida_handle;
|
| /linux/drivers/slimbus/ |
| H A D | slimbus.h | 407 struct ida laddr_ida;
|