| /linux/lib/ |
| H A D | test_xarray.c | 20 void xa_dump(const struct xarray *xa) { } in xa_dump() argument 23 #define XA_BUG_ON(xa, x) do { \ argument 27 xa_dump(xa); \ 40 static void *xa_store_index(struct xarray *xa, unsigned long index, gfp_t gfp) in xa_store_index() argument 42 return xa_store(xa, index, xa_mk_index(index), gfp); in xa_store_index() 45 static void xa_insert_index(struct xarray *xa, unsigned long index) in xa_insert_index() argument 47 XA_BUG_ON(xa, xa_insert(xa, index, xa_mk_index(index), in xa_insert_index() 51 static void xa_alloc_index(struct xarray *xa, unsigned long index, gfp_t gfp) in xa_alloc_index() argument 55 XA_BUG_ON(xa, xa_alloc(xa, &id, xa_mk_index(index), xa_limit_32b, in xa_alloc_index() 57 XA_BUG_ON(xa, id != index); in xa_alloc_index() [all …]
|
| H A D | xarray.c | 33 static inline unsigned int xa_lock_type(const struct xarray *xa) in xa_lock_type() argument 35 return (__force unsigned int)xa->xa_flags & 3; in xa_lock_type() 58 static inline bool xa_track_free(const struct xarray *xa) in xa_track_free() argument 60 return xa->xa_flags & XA_FLAGS_TRACK_FREE; in xa_track_free() 63 static inline bool xa_zero_busy(const struct xarray *xa) in xa_zero_busy() argument 65 return xa->xa_flags & XA_FLAGS_ZERO_BUSY; in xa_zero_busy() 68 static inline void xa_mark_set(struct xarray *xa, xa_mark_t mark) in xa_mark_set() argument 70 if (!(xa->xa_flags & XA_FLAGS_MARK(mark))) in xa_mark_set() 71 xa->xa_flags |= XA_FLAGS_MARK(mark); in xa_mark_set() 74 static inline void xa_mark_clear(struct xarray *xa, xa_mark_t mark) in xa_mark_clear() argument [all …]
|
| H A D | idr.c | 385 XA_STATE(xas, &ida->xa, min / IDA_BITMAP_BITS); in ida_alloc_range() 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() 558 XA_STATE(xas, &ida->xa, id / IDA_BITMAP_BITS); in ida_free() 612 XA_STATE(xas, &ida->xa, 0); in ida_destroy() 663 struct xarray *xa = &ida->xa; in ida_dump() local 664 pr_debug("ida: %p node %p free %d\n", ida, xa->xa_head, in ida_dump() 665 xa->xa_flags >> ROOT_TAG_SHIFT); in ida_dump() [all …]
|
| /linux/include/linux/ |
| H A D | xarray.h | 363 void *xa_find(struct xarray *xa, unsigned long *index, 365 void *xa_find_after(struct xarray *xa, unsigned long *index, 382 static inline void xa_init_flags(struct xarray *xa, gfp_t flags) in xa_init_flags() argument 384 spin_lock_init(&xa->xa_lock); in xa_init_flags() 385 xa->xa_flags = flags; in xa_init_flags() 386 xa->xa_head = NULL; in xa_init_flags() 397 static inline void xa_init(struct xarray *xa) in xa_init() argument 399 xa_init_flags(xa, 0); in xa_init() 409 static inline bool xa_empty(const struct xarray *xa) in xa_empty() argument 411 return xa->xa_head == NULL; in xa_empty() [all …]
|
| H A D | idr.h | 264 struct xarray xa; member 270 .xa = XARRAY_INIT(name, IDA_INIT_FLAGS) \ 334 xa_init_flags(&ida->xa, IDA_INIT_FLAGS); in ida_init() 339 return xa_empty(&ida->xa); in ida_is_empty()
|
| /linux/rust/kernel/ |
| H A D | xarray.rs | 29 /// `self.xa` is always an initialized and valid [`bindings::xarray`] whose entries are either 38 /// let xa = KBox::pin_init(XArray::new(AllocKind::Alloc1), GFP_KERNEL)?; 43 /// let mut guard = xa.lock(); 64 xa: Opaque<bindings::xarray>, in drop() 80 // SAFETY: `self.xa` is always valid by the type invariant. 81 unsafe { bindings::xa_destroy(self.xa.get()) }; 101 // SAFETY: `xa` is valid while the closure is called. in new() 103 // INVARIANT: `xa` is initialized here to an empty, valid [`bindings::xarray`]. in new() 104 xa <- Opaque::ffi_init(|xa| unsaf in new() 58 xa: Opaque<bindings::xarray>, global() field 151 xa: &'a XArray<T>, global() field [all...] |
| /linux/rust/helpers/ |
| H A D | xarray.c | 10 __rust_helper void rust_helper_xa_init_flags(struct xarray *xa, gfp_t flags) in rust_helper_xa_init_flags() argument 12 return xa_init_flags(xa, flags); in rust_helper_xa_init_flags() 15 __rust_helper int rust_helper_xa_trylock(struct xarray *xa) in rust_helper_xa_trylock() argument 17 return xa_trylock(xa); in rust_helper_xa_trylock() 20 __rust_helper void rust_helper_xa_lock(struct xarray *xa) in rust_helper_xa_lock() argument 22 return xa_lock(xa); in rust_helper_xa_lock() 25 __rust_helper void rust_helper_xa_unlock(struct xarray *xa) in rust_helper_xa_unlock() argument 27 return xa_unlock(xa); in rust_helper_xa_unlock()
|
| /linux/include/trace/events/ |
| H A D | xdp.h | 306 TP_PROTO(const struct xdp_mem_allocator *xa), 308 TP_ARGS(xa), 311 __field(const struct xdp_mem_allocator *, xa) 318 __entry->xa = xa; 319 __entry->mem_id = xa->mem.id; 320 __entry->mem_type = xa->mem.type; 321 __entry->allocator = xa->allocator; 333 TP_PROTO(const struct xdp_mem_allocator *xa, 336 TP_ARGS(xa, rxq), 339 __field(const struct xdp_mem_allocator *, xa) [all …]
|
| /linux/tools/testing/radix-tree/ |
| H A D | iteration_check_2.c | 35 struct xarray *xa = arg; in throbber() local 43 xa_store(xa, i, xa_mk_value(i), GFP_KERNEL); in throbber() 44 xa_set_mark(xa, i, XA_MARK_0); in throbber() 47 xa_erase(xa, i); in throbber()
|
| H A D | test.c | 79 int item_delete_rcu(struct xarray *xa, unsigned long index) in item_delete_rcu() argument 81 struct item *item = xa_erase(xa, index); in item_delete_rcu() 173 int tag_tagged_items(struct xarray *xa, unsigned long start, unsigned long end, in tag_tagged_items() argument 176 XA_STATE(xas, xa, start); in tag_tagged_items() 255 void item_kill_tree(struct xarray *xa) in item_kill_tree() argument 257 XA_STATE(xas, xa, 0); in item_kill_tree() 267 assert(xa_empty(xa)); in item_kill_tree()
|
| H A D | iteration_check.c | 21 void my_item_insert(struct xarray *xa, unsigned long index) in my_item_insert() argument 23 XA_STATE(xas, xa, index); in my_item_insert()
|
| /linux/net/core/ |
| H A D | xdp.c | 55 const struct xdp_mem_allocator *xa = ptr; in xdp_mem_id_cmp() local 58 return xa->mem.id != mem_id; in xdp_mem_id_cmp() 75 struct xdp_mem_allocator *xa; in __xdp_mem_allocator_rcu_free() local 77 xa = container_of(rcu, struct xdp_mem_allocator, rcu); in __xdp_mem_allocator_rcu_free() 80 ida_free(&mem_id_pool, xa->mem.id); in __xdp_mem_allocator_rcu_free() 82 kfree(xa); in __xdp_mem_allocator_rcu_free() 85 static void mem_xa_remove(struct xdp_mem_allocator *xa) in mem_xa_remove() argument 87 trace_mem_disconnect(xa); in mem_xa_remove() 89 if (!rhashtable_remove_fast(mem_id_ht, &xa->node, mem_id_rht_params)) in mem_xa_remove() 90 call_rcu(&xa->rcu, __xdp_mem_allocator_rcu_free); in mem_xa_remove() [all …]
|
| /linux/arch/arm64/boot/dts/qcom/ |
| H A D | pmr735d_a.dtsi | 37 reg = <0xa SPMI_USID>; 44 interrupts = <0xa 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
|
| H A D | sc8280xp-pmics.dtsi | 201 interrupts-extended = <&spmi_bus 0x1 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; 227 interrupts-extended = <&spmi_bus 0x2 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; 262 interrupts-extended = <&spmi_bus 0x3 0xa 0x0 IRQ_TYPE_EDGE_BOTH>; 288 interrupts-extended = <&spmi_bus 0x4 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
|
| H A D | pm8009.dtsi | 12 reg = <0xa SPMI_USID>;
|
| H A D | pm8450.dtsi | 44 interrupts = <0x7 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
|
| /linux/io_uring/ |
| H A D | tctx.c | 59 xa_for_each(&tctx->xa, index, node) { in io_uring_free_tctx() 107 xa_init(&tctx->xa); in io_uring_alloc_task_context() 123 if (xa_load(&tctx->xa, (unsigned long)ctx)) in io_tctx_install_node() 132 ret = xa_err(xa_store(&tctx->xa, (unsigned long)ctx, in io_tctx_install_node() 224 node = xa_erase(&tctx->xa, index); in io_uring_del_tctx_node() 239 if (xa_empty(&tctx->xa) && tctx->io_wq) in io_uring_del_tctx_node() 249 xa_for_each(&tctx->xa, index, node) { in io_uring_clean_tctx()
|
| /linux/drivers/iommu/amd/ |
| H A D | nested.c | 62 static void *gdom_info_load_or_alloc_locked(struct xarray *xa, in gdom_info_load_or_alloc_locked() argument 68 elm = xa_load(xa, index); in gdom_info_load_or_alloc_locked() 72 xa_unlock_irqrestore(xa, *flags); in gdom_info_load_or_alloc_locked() 74 xa_lock_irqsave(xa, *flags); in gdom_info_load_or_alloc_locked() 78 res = __xa_cmpxchg(xa, index, NULL, elm, GFP_ATOMIC); in gdom_info_load_or_alloc_locked()
|
| /linux/arch/powerpc/boot/dts/fsl/ |
| H A D | p2020ds.dtsi | 221 0x8800 0x0 0x0 0x2 &i8259 0xa 0x2 225 0x8900 0x0 0x0 0x2 &i8259 0xa 0x2 229 0x8a00 0x0 0x0 0x2 &i8259 0xa 0x2 233 0x8b00 0x0 0x0 0x2 &i8259 0xa 0x2 237 0x8c00 0x0 0x0 0x2 &i8259 0xa 0x2 241 0x8d00 0x0 0x0 0x2 &i8259 0xa 0x2 245 0x8e00 0x0 0x0 0x2 &i8259 0xa 0x2 249 0x8f00 0x0 0x0 0x2 &i8259 0xa 0x2
|
| /linux/drivers/cxl/core/ |
| H A D | cdat.c | 390 static void discard_dsmas(struct xarray *xa) in discard_dsmas() argument 395 xa_for_each(xa, index, ent) { in discard_dsmas() 396 xa_erase(xa, index); in discard_dsmas() 399 xa_destroy(xa); in discard_dsmas() 723 static void free_perf_xa(struct xarray *xa) in free_perf_xa() argument 728 if (!xa) in free_perf_xa() 731 xa_for_each(xa, index, ctx) in free_perf_xa() 733 xa_destroy(xa); in free_perf_xa() 734 kfree(xa); in free_perf_xa() 862 static struct xarray *cxl_rp_gather_bandwidth(struct xarray *xa) in cxl_rp_gather_bandwidth() argument [all …]
|
| /linux/arch/powerpc/boot/dts/ |
| H A D | mvme5100.dts | 132 0x8000 0x0 0x0 0x2 &mpic 0xa 0x1 139 0x8800 0x0 0x0 0x3 &mpic 0xa 0x1 149 0xa000 0x0 0x0 0x2 &mpic 0xa 0x1
|
| /linux/arch/arm/boot/dts/qcom/ |
| H A D | pmx65.dtsi | 19 interrupts = <0x1 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
|
| /linux/arch/arm/boot/dts/nxp/imx/ |
| H A D | imx53-kp-hsc.dts | 27 reg = <0xa>;
|
| /linux/arch/arm64/boot/dts/freescale/ |
| H A D | qoriq-fman3-0-1g-2.dtsi | 11 cell-index = <0xa>;
|
| /linux/arch/arm/boot/dts/marvell/ |
| H A D | armada-xp-mv78460.dtsi | 113 0x82000000 0xa 0 MBUS_ID(0x08, 0xf8) 0 1 0 /* Port 3.0 MEM */ 114 0x81000000 0xa 0 MBUS_ID(0x08, 0xf0) 0 1 0 /* Port 3.0 IO */>; 377 ranges = <0x82000000 0 0 0x82000000 0xa 0 1 0 378 0x81000000 0 0 0x81000000 0xa 0 1 0>;
|