Home
last modified time | relevance | path

Searched refs:idr (Results 1 – 25 of 171) sorted by relevance

1234567

/kernel/linux/linux-5.10/tools/testing/radix-tree/
Didr-test.c25 void item_idr_remove(struct idr *idr, int id) in item_idr_remove() argument
27 struct item *item = idr_find(idr, id); in item_idr_remove()
29 idr_remove(idr, id); in item_idr_remove()
36 DEFINE_IDR(idr); in idr_alloc_test()
38 assert(idr_alloc_cyclic(&idr, DUMMY_PTR, 0, 0x4000, GFP_KERNEL) == 0); in idr_alloc_test()
39 assert(idr_alloc_cyclic(&idr, DUMMY_PTR, 0x3ffd, 0x4000, GFP_KERNEL) == 0x3ffd); in idr_alloc_test()
40 idr_remove(&idr, 0x3ffd); in idr_alloc_test()
41 idr_remove(&idr, 0); in idr_alloc_test()
52 id = idr_alloc_cyclic(&idr, item, 1, 0x4000, GFP_KERNEL); in idr_alloc_test()
56 idr_for_each(&idr, item_idr_free, &idr); in idr_alloc_test()
[all …]
DMakefile7 TARGETS = main idr-test multiorder xarray
8 CORE_OFILES := xarray.o radix-tree.o idr.o linux.o test.o find_bit.o bitmap.o
10 regression4.o tag_check.o multiorder.o idr-test.o iteration_check.o \
26 idr-test.o: ../../../lib/test_ida.c
27 idr-test: idr-test.o $(CORE_OFILES)
34 $(RM) $(TARGETS) *.o radix-tree.c idr.c generated/map-shift.h
43 ../../../include/linux/idr.h
48 idr.c: ../../../lib/idr.c
D.gitignore3 idr.c
4 idr-test
/kernel/linux/linux-5.10/include/linux/
Didr.h19 struct idr { struct
56 #define DEFINE_IDR(name) struct idr name = IDR_INIT(name)
66 static inline unsigned int idr_get_cursor(const struct idr *idr) in idr_get_cursor() argument
68 return READ_ONCE(idr->idr_next); in idr_get_cursor()
79 static inline void idr_set_cursor(struct idr *idr, unsigned int val) in idr_set_cursor() argument
81 WRITE_ONCE(idr->idr_next, val); in idr_set_cursor()
101 #define idr_lock(idr) xa_lock(&(idr)->idr_rt) argument
102 #define idr_unlock(idr) xa_unlock(&(idr)->idr_rt) argument
103 #define idr_lock_bh(idr) xa_lock_bh(&(idr)->idr_rt) argument
104 #define idr_unlock_bh(idr) xa_unlock_bh(&(idr)->idr_rt) argument
[all …]
Dpowercap.h66 struct idr idr; member
143 struct idr idr; member
144 struct idr *parent_idr;
Dpid_namespace.h22 struct idr idr; member
/kernel/linux/linux-5.10/lib/
Didr.c33 int idr_alloc_u32(struct idr *idr, void *ptr, u32 *nextid, in idr_alloc_u32() argument
38 unsigned int base = idr->idr_base; in idr_alloc_u32()
41 if (WARN_ON_ONCE(!(idr->idr_rt.xa_flags & ROOT_IS_IDR))) in idr_alloc_u32()
42 idr->idr_rt.xa_flags |= IDR_RT_MARKER; in idr_alloc_u32()
46 slot = idr_get_free(&idr->idr_rt, &iter, gfp, max - base); in idr_alloc_u32()
52 radix_tree_iter_replace(&idr->idr_rt, &iter, slot, ptr); in idr_alloc_u32()
53 radix_tree_iter_tag_clear(&idr->idr_rt, &iter, IDR_FREE); in idr_alloc_u32()
79 int idr_alloc(struct idr *idr, void *ptr, int start, int end, gfp_t gfp) in idr_alloc() argument
87 ret = idr_alloc_u32(idr, ptr, &id, end > 0 ? end - 1 : INT_MAX, gfp); in idr_alloc()
117 int idr_alloc_cyclic(struct idr *idr, void *ptr, int start, int end, gfp_t gfp) in idr_alloc_cyclic() argument
[all …]
/kernel/linux/linux-5.10/drivers/reset/
Dreset-ti-sci.c48 struct idr idr; member
80 control = idr_find(&data->idr, id); in ti_sci_reset_set()
161 control = idr_find(&data->idr, id); in ti_sci_reset_status()
209 return idr_alloc(&data->idr, control, 0, 0, GFP_KERNEL); in ti_sci_reset_of_xlate()
239 idr_init(&data->idr); in ti_sci_reset_probe()
252 idr_destroy(&data->idr); in ti_sci_reset_remove()
/kernel/linux/linux-5.10/fs/notify/inotify/
Dinotify_user.c311 idr_set_cursor(&data->idr, (unsigned int)arg); in inotify_ioctl()
359 static int inotify_add_to_idr(struct idr *idr, spinlock_t *idr_lock, in inotify_add_to_idr() argument
367 ret = idr_alloc_cyclic(idr, i_mark, 1, 0, GFP_NOWAIT); in inotify_add_to_idr()
382 struct idr *idr = &group->inotify_data.idr; in inotify_idr_find_locked() local
388 i_mark = idr_find(idr, wd); in inotify_idr_find_locked()
420 struct idr *idr = &group->inotify_data.idr; in inotify_remove_from_idr() local
471 idr_remove(idr, wd); in inotify_remove_from_idr()
563 struct idr *idr = &group->inotify_data.idr; in inotify_new_watch() local
576 ret = inotify_add_to_idr(idr, idr_lock, tmp_i_mark); in inotify_new_watch()
646 idr_init(&group->inotify_data.idr); in inotify_new_group()
/kernel/linux/linux-5.10/drivers/gpu/drm/vc4/
Dvc4_perfmon.c70 perfmon = idr_find(&vc4file->perfmon.idr, id); in vc4_perfmon_find()
80 idr_init(&vc4file->perfmon.idr); in vc4_perfmon_open_file()
95 idr_for_each(&vc4file->perfmon.idr, vc4_perfmon_idr_del, NULL); in vc4_perfmon_close_file()
96 idr_destroy(&vc4file->perfmon.idr); in vc4_perfmon_close_file()
139 ret = idr_alloc(&vc4file->perfmon.idr, perfmon, VC4_PERFMONID_MIN, in vc4_perfmon_create_ioctl()
166 perfmon = idr_remove(&vc4file->perfmon.idr, req->id); in vc4_perfmon_destroy_ioctl()
191 perfmon = idr_find(&vc4file->perfmon.idr, req->id); in vc4_perfmon_get_values_ioctl()
/kernel/linux/linux-5.10/drivers/firmware/arm_scmi/
Ddriver.c94 struct idr tx_idr;
95 struct idr rx_idr;
670 struct idr *idr; in scmi_chan_setup() local
674 idr = tx ? &info->tx_idr : &info->rx_idr; in scmi_chan_setup()
677 cinfo = idr_find(idr, prot_id); in scmi_chan_setup()
682 cinfo = idr_find(idr, SCMI_PROTOCOL_BASE); in scmi_chan_setup()
699 ret = idr_alloc(idr, cinfo, prot_id, prot_id + 1, GFP_KERNEL); in scmi_chan_setup()
849 void scmi_free_channel(struct scmi_chan_info *cinfo, struct idr *idr, int id) in scmi_free_channel() argument
851 idr_remove(idr, id); in scmi_free_channel()
858 struct idr *idr = &info->tx_idr; in scmi_remove() local
[all …]
/kernel/linux/linux-5.10/include/drm/
Ddrm_auth.h88 struct idr magic_map;
101 struct idr leases;
102 struct idr lessee_idr;
Ddrm_device.h306 struct idr object_name_idr;
342 struct idr ctx_idr;
/kernel/linux/linux-5.10/kernel/
Dpid.c77 .idr = IDR_INIT(init_pid_ns.idr),
152 idr_remove(&ns->idr, upid->nr); in free_pid()
212 nr = idr_alloc(&tmp->idr, NULL, tid, in alloc_pid()
226 if (idr_get_cursor(&tmp->idr) > RESERVED_PIDS) in alloc_pid()
233 nr = idr_alloc_cyclic(&tmp->idr, NULL, pid_min, in alloc_pid()
274 idr_replace(&upid->ns->idr, pid, upid->nr); in alloc_pid()
289 idr_remove(&upid->ns->idr, upid->nr); in alloc_pid()
294 idr_set_cursor(&ns->idr, 0); in alloc_pid()
311 return idr_find(&ns->idr, nr); in find_pid_ns()
520 return idr_get_next(&ns->idr, &nr); in find_ge_pid()
[all …]
Dpid_namespace.c95 idr_init(&ns->idr); in create_pid_namespace()
116 idr_destroy(&ns->idr); in create_pid_namespace()
138 idr_destroy(&ns->idr); in destroy_pid_namespace()
209 idr_for_each_entry_continue(&pid_ns->idr, pid, nr) { in zap_pid_ns_processes()
282 next = idr_get_cursor(&pid_ns->idr) - 1; in pid_ns_ctl_handler()
287 idr_set_cursor(&pid_ns->idr, next + 1); in pid_ns_ctl_handler()
/kernel/linux/linux-5.10/drivers/tee/optee/
Dsupp.c27 idr_init(&supp->idr); in optee_supp_init()
35 idr_destroy(&supp->idr); in optee_supp_uninit()
47 idr_for_each_entry(&supp->idr, req, id) { in optee_supp_release()
48 idr_remove(&supp->idr, id); in optee_supp_release()
175 *id = idr_alloc(&supp->idr, req, 1, 0, GFP_KERNEL); in supp_pop_entry()
315 req = idr_find(&supp->idr, id); in supp_pop_req()
322 idr_remove(&supp->idr, id); in supp_pop_req()
/kernel/linux/linux-5.10/drivers/staging/unisys/visorhba/
Dvisorhba_main.c89 struct idr idr; member
233 static unsigned int simple_idr_get(struct idr *idrtable, void *p, in simple_idr_get()
262 static void setup_scsitaskmgmt_handles(struct idr *idrtable, spinlock_t *lock, in setup_scsitaskmgmt_handles()
280 static void cleanup_scsitaskmgmt_handles(struct idr *idrtable, in cleanup_scsitaskmgmt_handles()
324 setup_scsitaskmgmt_handles(&devdata->idr, &devdata->privlock, cmdrsp, in forward_taskmgmt_command()
351 cleanup_scsitaskmgmt_handles(&devdata->idr, cmdrsp); in forward_taskmgmt_command()
358 cleanup_scsitaskmgmt_handles(&devdata->idr, cmdrsp); in forward_taskmgmt_command()
694 static void complete_taskmgmt_command(struct idr *idrtable, in complete_taskmgmt_command()
748 complete_taskmgmt_command(&devdata->idr, cmdrsp, in visorhba_serverdown_complete()
945 complete_taskmgmt_command(&devdata->idr, cmdrsp, in drain_queue()
[all …]
/kernel/linux/linux-5.10/drivers/tee/
Dtee_private.h57 struct idr idr; member
Dtee_shm.c109 shm->id = idr_alloc(&teedev->idr, shm, 1, 0, GFP_KERNEL); in tee_shm_alloc()
226 shm->id = idr_alloc(&teedev->idr, shm, 1, 0, GFP_KERNEL); in tee_shm_register()
246 idr_remove(&teedev->idr, shm->id); in tee_shm_register()
419 shm = idr_find(&teedev->idr, id); in tee_shm_get_from_id()
452 idr_remove(&teedev->idr, shm->id); in tee_shm_put()
/kernel/linux/linux-5.10/Documentation/core-api/
Didr.rst66 .. kernel-doc:: include/linux/idr.h
67 :doc: idr sync
72 .. kernel-doc:: lib/idr.c
78 .. kernel-doc:: include/linux/idr.h
80 .. kernel-doc:: lib/idr.c
/kernel/linux/linux-5.10/drivers/char/ipmi/
Dkcs_bmc_aspeed.c231 { .idr = LPC_IDR1, .odr = LPC_ODR1, .str = LPC_STR1 },
232 { .idr = LPC_IDR2, .odr = LPC_ODR2, .str = LPC_STR2 },
233 { .idr = LPC_IDR3, .odr = LPC_ODR3, .str = LPC_STR3 },
234 { .idr = LPC_IDR4, .odr = LPC_ODR4, .str = LPC_STR4 },
306 ioreg.idr = be32_to_cpup(reg); in aspeed_kcs_probe_of_v2()
383 kcs_bmc->channel, kcs_bmc->ioreg.idr, kcs_bmc->ioreg.odr, in aspeed_kcs_probe()
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx5/core/fpga/
Dtls.h48 struct idr tx_idr;
49 struct idr rx_idr;
/kernel/linux/linux-5.10/drivers/gpu/drm/vmwgfx/
Dttm_object.c97 struct idr idr; member
177 ret = idr_alloc(&tdev->idr, base, 1, 0, GFP_NOWAIT); in ttm_base_object_init()
193 idr_remove(&tdev->idr, base->handle); in ttm_base_object_init()
205 idr_remove(&tdev->idr, base->handle); in ttm_release_base()
290 base = idr_find(&tdev->idr, key); in ttm_base_object_lookup_for_ref()
543 idr_init(&tdev->idr); in ttm_object_device_init()
562 WARN_ON_ONCE(!idr_is_empty(&tdev->idr)); in ttm_object_device_release()
563 idr_destroy(&tdev->idr); in ttm_object_device_release()
/kernel/linux/linux-5.10/drivers/scsi/cxlflash/
Docxl_hw.h39 struct idr idr; /* IDR to manage contexts */ member
/kernel/linux/linux-5.10/drivers/infiniband/core/
Drdma_core.c309 return xa_alloc(&uobj->ufile->idr, &uobj->id, NULL, xa_limit_32b, in idr_add_uobj()
331 uobj = xa_load(&ufile->idr, id); in lookup_get_idr_uobject()
452 xa_erase(&attrs->ufile->idr, uobj->id); in alloc_begin_idr_uobject()
534 xa_erase(&uobj->ufile->idr, uobj->id); in alloc_abort_idr_uobject()
565 xa_erase(&uobj->ufile->idr, uobj->id); in remove_handle_idr_uobject()
608 old = xa_store(&ufile->idr, uobj->id, uobj, GFP_KERNEL); in alloc_commit_idr_uobject()
732 xa_init_flags(&ufile->idr, XA_FLAGS_ALLOC); in setup_ufile_idr_uobject()
748 xa_for_each(&ufile->idr, id, entry) { in release_ufile_idr_uobject()
753 xa_destroy(&ufile->idr); in release_ufile_idr_uobject()

1234567