Home
last modified time | relevance | path

Searched full:array (Results 1 – 25 of 4075) sorted by relevance

12345678910>>...163

/Linux-v6.6/drivers/dma-buf/
Ddma-fence-array.c3 * dma-fence-array: aggregate fences to be waited together
14 #include <linux/dma-fence-array.h>
28 static void dma_fence_array_set_pending_error(struct dma_fence_array *array, in dma_fence_array_set_pending_error() argument
36 cmpxchg(&array->base.error, PENDING_ERROR, error); in dma_fence_array_set_pending_error()
39 static void dma_fence_array_clear_pending_error(struct dma_fence_array *array) in dma_fence_array_clear_pending_error() argument
42 cmpxchg(&array->base.error, PENDING_ERROR, 0); in dma_fence_array_clear_pending_error()
47 struct dma_fence_array *array = container_of(wrk, typeof(*array), work); in irq_dma_fence_array_work() local
49 dma_fence_array_clear_pending_error(array); in irq_dma_fence_array_work()
51 dma_fence_signal(&array->base); in irq_dma_fence_array_work()
52 dma_fence_put(&array->base); in irq_dma_fence_array_work()
[all …]
Ddma-fence-unwrap.c11 #include <linux/dma-fence-array.h>
16 /* Internal helper to start new array iteration, don't use directly */
20 cursor->array = dma_fence_chain_contained(cursor->chain); in __dma_fence_unwrap_array()
22 return dma_fence_array_first(cursor->array); in __dma_fence_unwrap_array()
53 tmp = dma_fence_array_next(cursor->array, cursor->index); in dma_fence_unwrap_next()
68 struct dma_fence *tmp, **array; in __dma_fence_unwrap_merge() local
95 array = kmalloc_array(count, sizeof(*array), GFP_KERNEL); in __dma_fence_unwrap_merge()
96 if (!array) in __dma_fence_unwrap_merge()
100 * This trashes the input fence array and uses it as position for the in __dma_fence_unwrap_merge()
102 * wrapper macro is creating this temporary array on the stack together in __dma_fence_unwrap_merge()
[all …]
/Linux-v6.6/drivers/misc/vmw_vmci/
Dvmci_handle_array.c19 struct vmci_handle_arr *array; in vmci_handle_arr_create() local
28 array = kmalloc(handle_arr_calc_size(capacity), GFP_ATOMIC); in vmci_handle_arr_create()
29 if (!array) in vmci_handle_arr_create()
32 array->capacity = capacity; in vmci_handle_arr_create()
33 array->max_capacity = max_capacity; in vmci_handle_arr_create()
34 array->size = 0; in vmci_handle_arr_create()
36 return array; in vmci_handle_arr_create()
39 void vmci_handle_arr_destroy(struct vmci_handle_arr *array) in vmci_handle_arr_destroy() argument
41 kfree(array); in vmci_handle_arr_destroy()
47 struct vmci_handle_arr *array = *array_ptr; in vmci_handle_arr_append_entry() local
[all …]
Dvmci_handle_array.h25 /* Select a default capacity that results in a 64 byte sized array */
27 /* Make sure that the max array size can be expressed by a u32 */
33 void vmci_handle_arr_destroy(struct vmci_handle_arr *array);
36 struct vmci_handle vmci_handle_arr_remove_entry(struct vmci_handle_arr *array,
39 struct vmci_handle vmci_handle_arr_remove_tail(struct vmci_handle_arr *array);
41 vmci_handle_arr_get_entry(const struct vmci_handle_arr *array, u32 index);
42 bool vmci_handle_arr_has_entry(const struct vmci_handle_arr *array,
44 struct vmci_handle *vmci_handle_arr_get_handles(struct vmci_handle_arr *array);
47 const struct vmci_handle_arr *array) in vmci_handle_arr_get_size() argument
49 return array->size; in vmci_handle_arr_get_size()
/Linux-v6.6/fs/xfs/scrub/
Dxfarray.c19 * This memory array uses an xfile (which itself is a memfd "file") to store
22 * because we don't have to pin so much memory. However, array access is less
23 * direct than would be in a regular memory array. Access to the array is
25 * provided for convenience. Array elements can be unset, which sets them to
34 * buffer array items when we need space to store values temporarily.
36 static inline void *xfarray_scratch(struct xfarray *array) in xfarray_scratch() argument
38 return (array + 1); in xfarray_scratch()
41 /* Compute array index given an xfile offset. */
44 struct xfarray *array, in xfarray_idx() argument
47 if (array->obj_size_log >= 0) in xfarray_idx()
[all …]
Dxfarray.h9 /* xfile array index type, along with cursor initialization */
13 /* Iterate each index of an xfile array. */
14 #define foreach_xfarray_idx(array, idx) \ argument
16 (idx) < xfarray_length(array); \
20 /* Underlying file that backs the array. */
23 /* Number of array elements. */
26 /* Maximum possible array size. */
29 /* Number of unset slots in the array below @nr. */
32 /* Size of an array element. */
35 /* log2 of array element size, if possible. */
[all …]
/Linux-v6.6/sound/hda/
Darray.c11 * snd_array_new - get a new element from the given array
12 * @array: the array object
14 * Get a new element from the given array. If it exceeds the
15 * pre-allocated array size, re-allocate the array.
19 void *snd_array_new(struct snd_array *array) in snd_array_new() argument
21 if (snd_BUG_ON(!array->elem_size)) in snd_array_new()
23 if (array->used >= array->alloced) { in snd_array_new()
24 int num = array->alloced + array->alloc_align; in snd_array_new()
25 int oldsize = array->alloced * array->elem_size; in snd_array_new()
26 int size = (num + 1) * array->elem_size; in snd_array_new()
[all …]
/Linux-v6.6/drivers/md/persistent-data/
Ddm-array.h15 * The dm-array is a persistent version of an array. It packs the data
26 * size along with the array root in your encompassing data.
28 * Array entries are indexed via an unsigned integer starting from zero.
29 * Arrays are not sparse; if you resize an array to have 'n' entries then
34 * a) initialise a dm_array_info structure. This describes the array
40 * disk that holds a particular instance of an array. You may have a
42 * want to create a brand new, empty array with dm_array_empty().
46 * root for a _new_ array. If you've incremented the old root, via
50 * c) resize an array with dm_array_resize().
52 * d) Get a value from the array with dm_array_get_value().
[all …]
/Linux-v6.6/kernel/bpf/
Darraymap.c22 static void bpf_array_free_percpu(struct bpf_array *array) in bpf_array_free_percpu() argument
26 for (i = 0; i < array->map.max_entries; i++) { in bpf_array_free_percpu()
27 free_percpu(array->pptrs[i]); in bpf_array_free_percpu()
32 static int bpf_array_alloc_percpu(struct bpf_array *array) in bpf_array_alloc_percpu() argument
37 for (i = 0; i < array->map.max_entries; i++) { in bpf_array_alloc_percpu()
38 ptr = bpf_map_alloc_percpu(&array->map, array->elem_size, 8, in bpf_array_alloc_percpu()
41 bpf_array_free_percpu(array); in bpf_array_alloc_percpu()
44 array->pptrs[i] = ptr; in bpf_array_alloc_percpu()
87 struct bpf_array *array; in array_map_alloc() local
103 /* round up array size to nearest power of 2, in array_map_alloc()
[all …]
Dreuseport_array.c52 struct reuseport_array *array = reuseport_array(map); in reuseport_array_lookup_elem() local
55 if (unlikely(index >= array->map.max_entries)) in reuseport_array_lookup_elem()
58 return rcu_dereference(array->ptrs[index]); in reuseport_array_lookup_elem()
64 struct reuseport_array *array = reuseport_array(map); in reuseport_array_delete_elem() local
72 if (!rcu_access_pointer(array->ptrs[index])) in reuseport_array_delete_elem()
77 sk = rcu_dereference_protected(array->ptrs[index], in reuseport_array_delete_elem()
82 RCU_INIT_POINTER(array->ptrs[index], NULL); in reuseport_array_delete_elem()
96 struct reuseport_array *array = reuseport_array(map); in reuseport_array_free() local
102 * array now. Hence, this function only races with in reuseport_array_free()
107 * both removing sk from "array". Who removes it in reuseport_array_free()
[all …]
/Linux-v6.6/Documentation/admin-guide/
Dmd.rst22 or, to assemble a partitionable array::
44 level of the RAID array
92 If a raid5 or raid6 array is both dirty and degraded, it could have
98 For this reason, md will normally refuse to start such an array. This
99 requires the sysadmin to take action to explicitly start the array
104 This option is not really available if the array has the root
106 array, md supports a module parameter ``start_dirty_degraded`` which,
131 An array is ``created`` by writing appropriate superblocks to all
138 An array should be created by a user-space tool. This will write
139 superblocks to all devices. It will usually mark the array as
[all …]
/Linux-v6.6/drivers/accel/habanalabs/common/
Dsecurity.c24 * hl_get_pb_block - return the relevant block within the block array
28 * @pb_blocks: blocks array
29 * @array_size: blocks array size
56 * @sgs_entry: pb array
82 * @pb_blocks: blocks array
83 * @sgs_array: pb array
84 * @array_size: blocks array size
111 * @pb_blocks: blocks array
112 * @sgs_array: pb array
113 * @array_size: blocks array size
[all …]
/Linux-v6.6/kernel/
Dstacktrace.c20 * @entries: Pointer to storage array
21 * @nr_entries: Number of entries in the storage array
41 * @entries: Pointer to storage array
42 * @nr_entries: Number of entries in the storage array
105 * stack_trace_save - Save a stack trace into a storage array
106 * @store: Pointer to storage array
107 * @size: Size of the storage array
128 * stack_trace_save_tsk - Save a task stack trace into a storage array
130 * @store: Pointer to storage array
131 * @size: Size of the storage array
[all …]
/Linux-v6.6/Documentation/core-api/
Dassoc_array.rst2 Generic Associative Array Implementation
8 This associative array implementation is an object container with the following
18 2. Objects do not need to contain linkage blocks for use by the array. This
20 Rather, the array is made up of metadata blocks that point to objects.
22 3. Objects require index keys to locate them within the array.
25 already in the array will replace the old object.
32 7. Index keys can include a hash to scatter objects throughout the array.
34 8. The array can iterated over. The objects will not necessarily come out in
37 9. The array can be iterated over while it is being modified, provided the
43 10. Objects in the array can be looked up by means of their index key.
[all …]
/Linux-v6.6/drivers/infiniband/hw/mthca/
Dmthca_allocator.c106 * Array of pointers with lazy allocation of leaf pages. Callers of
108 * serialize access to the array.
113 void *mthca_array_get(struct mthca_array *array, int index) in mthca_array_get() argument
117 if (array->page_list[p].page) in mthca_array_get()
118 return array->page_list[p].page[index & MTHCA_ARRAY_MASK]; in mthca_array_get()
123 int mthca_array_set(struct mthca_array *array, int index, void *value) in mthca_array_set() argument
128 if (!array->page_list[p].page) in mthca_array_set()
129 array->page_list[p].page = (void **) get_zeroed_page(GFP_ATOMIC); in mthca_array_set()
131 if (!array->page_list[p].page) in mthca_array_set()
134 array->page_list[p].page[index & MTHCA_ARRAY_MASK] = value; in mthca_array_set()
[all …]
/Linux-v6.6/drivers/gpio/
Dgpiolib-legacy.c70 * @array: array of the 'struct gpio'
71 * @num: how many GPIOs in the array
73 int gpio_request_array(const struct gpio *array, size_t num) in gpio_request_array() argument
77 for (i = 0; i < num; i++, array++) { in gpio_request_array()
78 err = gpio_request_one(array->gpio, array->flags, array->label); in gpio_request_array()
86 gpio_free((--array)->gpio); in gpio_request_array()
93 * @array: array of the 'struct gpio'
94 * @num: how many GPIOs in the array
96 void gpio_free_array(const struct gpio *array, size_t num) in gpio_free_array() argument
99 gpio_free((array++)->gpio); in gpio_free_array()
/Linux-v6.6/include/linux/
Ddma-fence-array.h3 * fence-array: aggregates fence to be waited together
19 * struct dma_fence_array_cb - callback helper for fence array
21 * @array: reference to the parent fence array object
25 struct dma_fence_array *array; member
29 * struct dma_fence_array - fence to represent an array of fences
32 * @num_fences: number of fences in the array
33 * @num_pending: fences in the array still pending
34 * @fences: array of the fences
65 * dma_fence_array_for_each - iterate over all fences in array
67 * @index: index into the array
[all …]
Dassoc_array.h2 /* Generic associative array implementation.
20 * Generic associative array.
28 * Operations on objects and index keys for use by array manipulation routines.
54 static inline void assoc_array_init(struct assoc_array *array) in assoc_array_init() argument
56 array->root = NULL; in assoc_array_init()
57 array->nr_leaves_on_tree = 0; in assoc_array_init()
60 extern int assoc_array_iterate(const struct assoc_array *array,
64 extern void *assoc_array_find(const struct assoc_array *array,
67 extern void assoc_array_destroy(struct assoc_array *array,
69 extern struct assoc_array_edit *assoc_array_insert(struct assoc_array *array,
[all …]
Dminmax.h159 * Do not check the array parameter using __must_be_array().
160 * In the following legit use-case where the "array" passed is a simple pointer,
168 * The first typeof(&(array)[0]) is needed in order to support arrays of both
171 * The array can be an array of const items.
175 #define __minmax_array(op, array, len) ({ \ argument
176 typeof(&(array)[0]) __array = (array); \
184 * min_array - return minimum of values present in an array
185 * @array: array
186 * @len: array length
188 * Note that @len must not be zero (empty array).
[all …]
/Linux-v6.6/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/
Dpwrseq.c8 /* 3 Power on Array */
15 /* 3Radio off GPIO Array */
22 /* 3Card Disable Array */
31 /* 3 Card Enable Array */
40 /* 3Suspend Array */
49 /* 3 Resume Array */
58 /* 3HWPDN Array */
84 /*3 Power on Array*/
91 /*3Radio off GPIO Array */
98 /*3Card Disable Array*/
[all …]
/Linux-v6.6/drivers/ras/
Dcec.c22 * array of the size of a memory page. It stores 512 u64's with the following
34 * and thus iterating over the array initially won't kick out those elements
38 * elements entered into the array, during which, we're decaying all elements.
68 * elements have stayed in the array without having been accessed again.
95 u64 *array; /* container page */ member
96 unsigned int n; /* number of elements in the array */
140 * element in the array. On insertion and any access, it gets reset to max.
147 u8 decay = DECAY(ca->array[i]); in do_spring_cleaning()
154 ca->array[i] &= ~(DECAY_MASK << COUNT_BITS); in do_spring_cleaning()
155 ca->array[i] |= (decay << COUNT_BITS); in do_spring_cleaning()
[all …]
/Linux-v6.6/scripts/coccinelle/misc/
Dflexible_array.cocci5 /// Flexible-array members should be used instead.
27 identifier name, array;
35 * T array@p[\(0\|1\)];
40 * T array@p[\(0\|1\)];
45 * T array@p[\(0\|1\)];
50 * T array@p[\(0\|1\)];
55 identifier name, array;
62 T array[0];
66 T array[0];
71 identifier name, array;
[all …]
/Linux-v6.6/fs/nfs/
Dpnfs_nfs.c130 struct pnfs_commit_array *array; in pnfs_find_commit_array_by_lseg() local
132 list_for_each_entry_rcu(array, &fl_cinfo->commits, cinfo_list) { in pnfs_find_commit_array_by_lseg()
133 if (array->lseg == lseg) in pnfs_find_commit_array_by_lseg()
134 return array; in pnfs_find_commit_array_by_lseg()
144 struct pnfs_commit_array *array; in pnfs_add_commit_array() local
146 array = pnfs_find_commit_array_by_lseg(fl_cinfo, lseg); in pnfs_add_commit_array()
147 if (array) in pnfs_add_commit_array()
148 return array; in pnfs_add_commit_array()
161 struct pnfs_commit_array *array; in pnfs_lookup_commit_array() local
164 array = pnfs_find_commit_array_by_lseg(fl_cinfo, lseg); in pnfs_lookup_commit_array()
[all …]
/Linux-v6.6/Documentation/bpf/
Dmap_array.rst12 ``BPF_MAP_TYPE_ARRAY`` and ``BPF_MAP_TYPE_PERCPU_ARRAY`` provide generic array
14 of constant size. The size of the array is defined in ``max_entries`` at
15 creation time. All array elements are pre-allocated and zero initialized when
18 stored can be of any size, however, all array elements are aligned to 8
24 memory are allocated to store all array values, starting on the second page,
42 Array elements can be retrieved using the ``bpf_map_lookup_elem()`` helper.
43 This helper returns a pointer into the array element, so to avoid data races
54 Array elements can be updated using the ``bpf_map_update_elem()`` helper.
59 Since the array is of constant size, ``bpf_map_delete_elem()`` is not supported.
60 To clear an array element, you may use ``bpf_map_update_elem()`` to insert a
[all …]
/Linux-v6.6/kernel/trace/
Dtracing_map.h25 * zeroed array of struct tracing_map_entry (stored in the map field
28 * variable and a pointer named 'val'. This array of struct
32 * this indirectly via an array of tracing_map_sort_entry - see the
39 * It then uses this key, truncated to the array size, as an index
40 * into the array of tracing_map_entries. If the value of the 'key'
63 * tracing_map_entries in the tracing_map_entry array which can be
66 * with the tracing_map_entry array in the tracing_map. Because of
68 * tracing_map_entry array is always twice the maximum number of
74 * both the tracing_map_entry array and a pool of max_elts
78 * The tracing_map_entry array is allocated as a single block by
[all …]

12345678910>>...163