| /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 …]
|
| H A D | intel_vsec.h | 139 struct ida *ida; member
|
| /linux/tools/testing/radix-tree/ |
| H A D | idr-test.c | 430 void ida_dump(struct ida *); 442 DEFINE_IDA(ida); in ida_check_nomem() 445 id = ida_alloc_min(&ida, 256, GFP_NOWAIT); in ida_check_nomem() 446 IDA_BUG_ON(&ida, id != -ENOMEM); in ida_check_nomem() 447 id = ida_alloc_min(&ida, 1UL << 30, GFP_NOWAIT); in ida_check_nomem() 448 IDA_BUG_ON(&ida, id != -ENOMEM); in ida_check_nomem() 449 IDA_BUG_ON(&ida, !ida_is_empty(&ida)); in ida_check_nomem() 457 DEFINE_IDA(ida); in ida_check_conv_user() 461 int id = ida_alloc(&ida, GFP_NOWAIT); in ida_check_conv_user() 463 IDA_BUG_ON(&ida, ((i % IDA_BITMAP_BITS) != in ida_check_conv_user() [all …]
|
| /linux/drivers/infiniband/hw/hns/ |
| H A D | hns_roce_pd.c | 39 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 D | hns_roce_alloc.c | 176 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 D | hns_roce_cq.c | 121 id = ida_alloc_range(&bank->ida, bank->min, bank->max, GFP_KERNEL); in alloc_cqn() 148 ida_free(&bank->ida, cqn >> CQ_BANKID_SHIFT); in free_cqn() 580 ida_init(&cq_table->bank[i].ida); in hns_roce_init_cq_table() 591 ida_destroy(&hr_dev->cq_table.bank[i].ida); in hns_roce_cleanup_cq_table()
|
| /linux/drivers/dax/ |
| H A D | dax-private.h | 37 struct ida ida; member 88 struct ida ida; member
|
| /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/usb/typec/ |
| H A D | class.h | 16 struct ida mode_ids; 34 struct ida mode_ids; 50 struct ida mode_ids;
|
| /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/pci/ |
| H A D | ide.c | 198 struct ida *ida; member 204 ida_free(stream->ida, stream->stream_index); in free_stream_index() 208 static struct stream_index *alloc_stream_index(struct ida *ida, u16 max, in DEFINE_FREE() 216 id = ida_alloc_max(ida, max - 1, GFP_KERNEL); in DEFINE_FREE() 221 .ida = ida, in DEFINE_FREE()
|
| /linux/include/media/ |
| H A D | media-device.h | 22 struct ida; 159 struct ida entity_internal_idx;
|
| /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
|
| /linux/drivers/net/ipvlan/ |
| H A D | ipvlan.h | 100 struct ida ida; member
|
| H A D | ipvlan_main.c | 80 ida_init(&port->ida); in ipvlan_port_create() 109 ida_destroy(&port->ida); in ipvlan_port_destroy() 612 err = ida_alloc_range(&port->ida, port->dev_id_start, 0xFFFD, in ipvlan_link_new() 615 err = ida_alloc_range(&port->ida, 0x1, port->dev_id_start - 1, in ipvlan_link_new() 648 ida_free(&port->ida, dev->dev_id); in ipvlan_link_new() 668 ida_free(&ipvlan->port->ida, dev->dev_id); in ipvlan_link_delete()
|
| /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/drivers/nvdimm/ |
| H A D | nd.h | 405 struct ida ns_ida; 406 struct ida btt_ida; 407 struct ida pfn_ida; 408 struct ida dax_ida;
|
| /linux/drivers/platform/x86/intel/ |
| H A D | vsec.c | 110 ida_free(intel_vsec_dev->ida, intel_vsec_dev->auxdev.id); in intel_vsec_dev_release() 225 id = ida_alloc(intel_vsec_dev->ida, GFP_KERNEL); in intel_vsec_add_aux() 344 intel_vsec_dev->ida = &intel_vsec_sdsi_ida; in intel_vsec_add_dev() 346 intel_vsec_dev->ida = &intel_vsec_ida; in intel_vsec_add_dev()
|
| /linux/drivers/net/ethernet/mellanox/mlxsw/ |
| H A D | spectrum_acl_tcam.h | 16 struct ida used_regions; 18 struct ida used_groups;
|
| /linux/sound/soc/sof/ |
| H A D | ipc4-priv.h | 39 struct ida m_ida;
|
| /linux/drivers/media/platform/chips-media/coda/ |
| H A D | coda.h | 101 struct ida ida; member
|