/Linux-v5.15/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() 540 void ida_destroy(struct ida *ida) in ida_destroy() argument 542 XA_STATE(xas, &ida->xa, 0); in ida_destroy() 591 static void ida_dump(struct ida *ida) in ida_dump() argument 593 struct xarray *xa = &ida->xa; in ida_dump() 594 pr_debug("ida: %p node %p free %d\n", ida, xa->xa_head, in ida_dump()
|
/Linux-v5.15/fs/ksmbd/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-v5.15/include/linux/ |
D | idr.h | 244 struct ida { struct 253 #define DEFINE_IDA(name) struct ida name = IDA_INIT(name) argument 255 int ida_alloc_range(struct ida *, unsigned int min, unsigned int max, gfp_t); 256 void ida_free(struct ida *, unsigned int id); 257 void ida_destroy(struct ida *ida); 271 static inline int ida_alloc(struct ida *ida, gfp_t gfp) in ida_alloc() argument 273 return ida_alloc_range(ida, 0, ~0, gfp); in ida_alloc() 289 static inline int ida_alloc_min(struct ida *ida, unsigned int min, gfp_t gfp) in ida_alloc_min() argument 291 return ida_alloc_range(ida, min, ~0, gfp); in ida_alloc_min() 307 static inline int ida_alloc_max(struct ida *ida, unsigned int max, gfp_t gfp) in ida_alloc_max() argument [all …]
|
D | thunderbolt.h | 239 struct ida service_ids; 240 struct ida in_hopids; 241 struct ida out_hopids; 480 struct ida msix_ida;
|
D | nfs_fs_sb.h | 234 struct ida openowner_id; 235 struct ida lockowner_id;
|
D | thermal.h | 172 struct ida ida; member
|
/Linux-v5.15/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-v5.15/drivers/infiniband/hw/hns/ |
D | hns_roce_pd.c | 41 ida_init(&pd_ida->ida); in hns_roce_init_pd_table() 55 id = ida_alloc_range(&pd_ida->ida, pd_ida->min, pd_ida->max, in hns_roce_alloc_pd() 69 ida_free(&pd_ida->ida, id); in hns_roce_alloc_pd() 81 ida_free(&hr_dev->pd_ida.ida, (int)to_hr_pd(pd)->pdn); in hns_roce_dealloc_pd() 93 id = ida_alloc_range(&uar_ida->ida, uar_ida->min, uar_ida->max, in hns_roce_uar_alloc() 110 ida_free(&uar_ida->ida, id); in hns_roce_uar_alloc() 127 ida_init(&uar_ida->ida); in hns_roce_init_uar_table() 137 id = ida_alloc_range(&xrcd_ida->ida, xrcd_ida->min, xrcd_ida->max, in hns_roce_xrcd_alloc() 152 ida_init(&xrcd_ida->ida); in hns_roce_init_xrcd_table() 178 ida_free(&hr_dev->xrcd_ida.ida, (int)xrcdn); in hns_roce_dealloc_xrcd()
|
D | hns_roce_alloc.c | 178 ida_destroy(&hr_dev->xrcd_ida.ida); in hns_roce_cleanup_bitmap() 181 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()
|
D | hns_roce_srq.c | 89 id = ida_alloc_range(&srq_ida->ida, srq_ida->min, srq_ida->max, in alloc_srqc() 139 ida_free(&srq_ida->ida, id); in alloc_srqc() 161 ida_free(&srq_table->srq_ida.ida, (int)srq->srqn); in free_srqc() 454 ida_init(&srq_ida->ida); in hns_roce_init_srq_table()
|
D | hns_roce_cq.c | 70 id = ida_alloc_range(&bank->ida, bank->min, bank->max, GFP_KERNEL); in alloc_cqn() 97 ida_free(&bank->ida, cqn >> CQ_BANKID_SHIFT); in free_cqn() 527 ida_init(&cq_table->bank[i].ida); in hns_roce_init_cq_table() 538 ida_destroy(&hr_dev->cq_table.bank[i].ida); in hns_roce_cleanup_cq_table()
|
/Linux-v5.15/drivers/dax/ |
D | dax-private.h | 37 struct ida ida; member 68 struct ida ida; member
|
/Linux-v5.15/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-v5.15/drivers/usb/typec/ |
D | class.h | 15 struct ida mode_ids; 32 struct ida mode_ids; 41 struct ida mode_ids;
|
/Linux-v5.15/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-v5.15/include/media/ |
D | media-device.h | 20 struct ida; 158 struct ida entity_internal_idx;
|
/Linux-v5.15/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-v5.15/drivers/net/ipvlan/ |
D | ipvlan.h | 100 struct ida ida; member
|
/Linux-v5.15/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-v5.15/drivers/nvdimm/ |
D | nd.h | 290 struct ida ns_ida; 291 struct ida btt_ida; 292 struct ida pfn_ida; 293 struct ida dax_ida;
|
/Linux-v5.15/drivers/staging/media/atomisp/pci/ |
D | atomisp_acc.c | 114 ida_destroy(&isp->asd[i].acc.ida); in atomisp_acc_cleanup() 129 ida_free(&asd->acc.ida, acc_fw->handle); in atomisp_acc_release() 179 handle = ida_alloc(&asd->acc.ida, GFP_KERNEL); in atomisp_acc_load_to_pipe() 238 ida_free(&asd->acc.ida, acc_fw->handle); in atomisp_acc_unload()
|
/Linux-v5.15/drivers/target/iscsi/ |
D | iscsi_target.h | 57 extern struct ida sess_ida;
|