| /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 | thunderbolt.h | 270 struct ida service_ids; 271 struct ida in_hopids; 272 struct ida out_hopids;
|
| /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 …]
|
| H A D | region_alloc_benchmark.c | 74 return sizeof(struct ida) + in ida_size() 81 struct ida ida = IDA_INIT(ida); in benchmark_ida() local 89 id = ida_alloc_max(&ida, cap - 1, GFP_KERNEL); in benchmark_ida() 98 ida_free(&ida, reg_idx[cnt] + off); in benchmark_ida() 113 ida_free(&ida, reg_idx[idx] + off); in benchmark_ida() 117 WARN_ON(!ida_is_empty(&ida)); in benchmark_ida() 122 ida_destroy(&ida); in benchmark_ida()
|
| /linux/drivers/dax/ |
| H A D | dax-private.h | 37 struct ida ida; member 92 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/thermal/testing/ |
| H A D | zone.c | 45 struct ida ida; member 145 ida_free(&tt_zone->ida, tt_trip->id); in tt_zone_free_trips() 154 ida_destroy(&tt_zone->ida); in tt_zone_free() 198 ida_init(&tt_zone->ida); in tt_add_tz() 343 id = ida_alloc(&tt_zone->ida, GFP_KERNEL); in tt_zone_add_trip()
|
| /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 | 195 struct ida *ida; member 201 ida_free(stream->ida, stream->stream_index); in free_stream_index() 205 static struct stream_index *alloc_stream_index(struct ida *ida, u16 max, in DEFINE_FREE() 213 id = ida_alloc_max(ida, max - 1, GFP_KERNEL); in DEFINE_FREE() 218 .ida = ida, in DEFINE_FREE()
|
| /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
|
| /linux/drivers/net/ipvlan/ |
| H A D | ipvlan.h | 102 struct ida ida; member
|
| H A D | ipvlan_main.c | 94 ida_init(&port->ida); in ipvlan_port_create() 126 ida_destroy(&port->ida); in ipvlan_port_destroy() 665 err = ida_alloc_range(&port->ida, port->dev_id_start, 0xFFFD, in ipvlan_link_new() 668 err = ida_alloc_range(&port->ida, 0x1, port->dev_id_start - 1, in ipvlan_link_new() 704 ida_free(&port->ida, dev->dev_id); in ipvlan_link_new() 725 ida_free(&ipvlan->port->ida, dev->dev_id); in __ipvlan_link_delete()
|
| /linux/drivers/perf/ |
| H A D | fsl_imx8_ddr_perf.c | 784 struct ida *ida; in ddr_perf_probe() local 811 ida = pmu->devtype_data->type == DDR_PERF_TYPE ? &ddr_ida : &db_ida; in ddr_perf_probe() 812 num = ida_alloc(ida, GFP_KERNEL); in ddr_perf_probe() 882 ida_free(ida, pmu->id); in ddr_perf_probe()
|
| /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/platform/x86/intel/ |
| H A D | vsec.c | 118 ida_free(intel_vsec_dev->ida, intel_vsec_dev->auxdev.id); in intel_vsec_dev_release() 238 id = ida_alloc(intel_vsec_dev->ida, GFP_KERNEL); in intel_vsec_add_aux() 367 intel_vsec_dev->ida = &intel_vsec_sdsi_ida; in intel_vsec_add_dev() 369 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
|
| /linux/include/linux/greybus/ |
| H A D | hd.h | 51 struct ida cport_id_map;
|