/linux-6.6.21/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 | 380 int ida_alloc_range(struct ida *ida, unsigned int min, unsigned int max, in ida_alloc_range() argument 383 XA_STATE(xas, &ida->xa, min / IDA_BITMAP_BITS); in ida_alloc_range() 487 void ida_free(struct ida *ida, unsigned int id) in ida_free() argument 489 XA_STATE(xas, &ida->xa, id / IDA_BITMAP_BITS); in ida_free() 541 void ida_destroy(struct ida *ida) in ida_destroy() argument 543 XA_STATE(xas, &ida->xa, 0); in ida_destroy() 592 static void ida_dump(struct ida *ida) in ida_dump() argument 594 struct xarray *xa = &ida->xa; in ida_dump() 595 pr_debug("ida: %p node %p free %d\n", ida, xa->xa_head, in ida_dump()
|
/linux-6.6.21/fs/smb/server/mgmt/ |
D | ksmbd_ida.c | 8 static inline int __acquire_id(struct ida *ida, int from, int to) in __acquire_id() argument 10 return ida_simple_get(ida, from, to, GFP_KERNEL); in __acquire_id() 13 int ksmbd_acquire_smb2_tid(struct ida *ida) in ksmbd_acquire_smb2_tid() argument 17 id = __acquire_id(ida, 1, 0xFFFFFFFF); in ksmbd_acquire_smb2_tid() 22 int ksmbd_acquire_smb2_uid(struct ida *ida) in ksmbd_acquire_smb2_uid() argument 26 id = __acquire_id(ida, 1, 0); in ksmbd_acquire_smb2_uid() 28 id = __acquire_id(ida, 1, 0); in ksmbd_acquire_smb2_uid() 33 int ksmbd_acquire_async_msg_id(struct ida *ida) in ksmbd_acquire_async_msg_id() argument 35 return __acquire_id(ida, 1, 0); in ksmbd_acquire_async_msg_id() 38 int ksmbd_acquire_id(struct ida *ida) in ksmbd_acquire_id() argument [all …]
|
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-6.6.21/include/linux/ |
D | idr.h | 246 struct ida { struct 255 #define DEFINE_IDA(name) struct ida name = IDA_INIT(name) argument 257 int ida_alloc_range(struct ida *, unsigned int min, unsigned int max, gfp_t); 258 void ida_free(struct ida *, unsigned int id); 259 void ida_destroy(struct ida *ida); 273 static inline int ida_alloc(struct ida *ida, gfp_t gfp) in ida_alloc() argument 275 return ida_alloc_range(ida, 0, ~0, gfp); in ida_alloc() 291 static inline int ida_alloc_min(struct ida *ida, unsigned int min, gfp_t gfp) in ida_alloc_min() argument 293 return ida_alloc_range(ida, min, ~0, gfp); in ida_alloc_min() 309 static inline int ida_alloc_max(struct ida *ida, unsigned int max, gfp_t gfp) in ida_alloc_max() argument [all …]
|
D | thunderbolt.h | 255 struct ida service_ids; 256 struct ida in_hopids; 257 struct ida out_hopids; 498 struct ida msix_ida;
|
D | nfs_fs_sb.h | 235 struct ida openowner_id; 236 struct ida lockowner_id;
|
/linux-6.6.21/tools/testing/radix-tree/ |
D | idr-test.c | 429 void ida_dump(struct ida *); 441 DEFINE_IDA(ida); in ida_check_nomem() 444 id = ida_alloc_min(&ida, 256, GFP_NOWAIT); in ida_check_nomem() 445 IDA_BUG_ON(&ida, id != -ENOMEM); in ida_check_nomem() 446 id = ida_alloc_min(&ida, 1UL << 30, GFP_NOWAIT); in ida_check_nomem() 447 IDA_BUG_ON(&ida, id != -ENOMEM); in ida_check_nomem() 448 IDA_BUG_ON(&ida, !ida_is_empty(&ida)); in ida_check_nomem() 456 DEFINE_IDA(ida); in ida_check_conv_user() 460 int id = ida_alloc(&ida, GFP_NOWAIT); in ida_check_conv_user() 462 IDA_BUG_ON(&ida, ((i % IDA_BITMAP_BITS) != in ida_check_conv_user() [all …]
|
/linux-6.6.21/drivers/infiniband/hw/hns/ |
D | hns_roce_pd.c | 40 ida_init(&pd_ida->ida); in hns_roce_init_pd_table() 54 id = ida_alloc_range(&pd_ida->ida, pd_ida->min, pd_ida->max, in hns_roce_alloc_pd() 68 ida_free(&pd_ida->ida, id); in hns_roce_alloc_pd() 80 ida_free(&hr_dev->pd_ida.ida, (int)to_hr_pd(pd)->pdn); in hns_roce_dealloc_pd() 91 id = ida_alloc_range(&uar_ida->ida, uar_ida->min, uar_ida->max, in hns_roce_uar_alloc() 116 ida_init(&uar_ida->ida); in hns_roce_init_uar_table() 126 id = ida_alloc_range(&xrcd_ida->ida, xrcd_ida->min, xrcd_ida->max, in hns_roce_xrcd_alloc() 141 ida_init(&xrcd_ida->ida); in hns_roce_init_xrcd_table() 167 ida_free(&hr_dev->xrcd_ida.ida, (int)xrcdn); in hns_roce_dealloc_xrcd()
|
D | hns_roce_alloc.c | 177 ida_destroy(&hr_dev->xrcd_ida.ida); in hns_roce_cleanup_bitmap() 180 ida_destroy(&hr_dev->srq_table.srq_ida.ida); in hns_roce_cleanup_bitmap() 183 ida_destroy(&hr_dev->mr_table.mtpt_ida.ida); in hns_roce_cleanup_bitmap() 184 ida_destroy(&hr_dev->pd_ida.ida); in hns_roce_cleanup_bitmap() 185 ida_destroy(&hr_dev->uar_ida.ida); in hns_roce_cleanup_bitmap()
|
D | hns_roce_cq.c | 69 id = ida_alloc_range(&bank->ida, bank->min, bank->max, GFP_KERNEL); in alloc_cqn() 96 ida_free(&bank->ida, cqn >> CQ_BANKID_SHIFT); in free_cqn() 521 ida_init(&cq_table->bank[i].ida); in hns_roce_init_cq_table() 532 ida_destroy(&hr_dev->cq_table.bank[i].ida); in hns_roce_cleanup_cq_table()
|
/linux-6.6.21/drivers/dax/ |
D | dax-private.h | 37 struct ida ida; member 70 struct ida ida; member
|
/linux-6.6.21/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() 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-6.6.21/drivers/usb/typec/ |
D | class.h | 15 struct ida mode_ids; 32 struct ida mode_ids; 43 struct ida mode_ids;
|
/linux-6.6.21/drivers/platform/x86/intel/ |
D | vsec.h | 45 struct ida *ida; member
|
D | vsec.c | 126 ida_free(intel_vsec_dev->ida, intel_vsec_dev->auxdev.id); in intel_vsec_dev_release() 149 id = ida_alloc(intel_vsec_dev->ida, GFP_KERNEL); in intel_vsec_add_aux() 239 intel_vsec_dev->ida = &intel_vsec_sdsi_ida; in intel_vsec_add_dev() 241 intel_vsec_dev->ida = &intel_vsec_ida; in intel_vsec_add_dev()
|
/linux-6.6.21/drivers/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()
|
/linux-6.6.21/drivers/hwmon/ |
D | coretemp.c | 92 struct ida ida; member 518 index = ida_alloc_max(&pdata->ida, NUM_REAL_CORES - 1, GFP_KERNEL); in create_core_data() 562 ida_free(&pdata->ida, index - BASE_SYSFS_ATTR_NO); in create_core_data() 588 ida_free(&pdata->ida, indx - BASE_SYSFS_ATTR_NO); in coretemp_remove_core() 603 ida_init(&pdata->ida); in coretemp_device_add() 631 ida_destroy(&pdata->ida); in coretemp_device_remove()
|
/linux-6.6.21/include/media/ |
D | media-device.h | 22 struct ida; 159 struct ida entity_internal_idx;
|
/linux-6.6.21/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-6.6.21/drivers/net/ipvlan/ |
D | ipvlan.h | 100 struct ida ida; member
|
/linux-6.6.21/arch/powerpc/platforms/powernv/ |
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()
|
D | vas.h | 321 struct ida ida; member
|
/linux-6.6.21/drivers/tty/serial/ |
D | serial_base.h | 19 struct ida port_ida;
|
/linux-6.6.21/drivers/nvdimm/ |
D | nd.h | 405 struct ida ns_ida; 406 struct ida btt_ida; 407 struct ida pfn_ida; 408 struct ida dax_ida;
|