| /linux/drivers/dma-buf/ |
| H A D | dma-fence-array.c | 3 * 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 …]
|
| /linux/drivers/misc/vmw_vmci/ |
| H A D | vmci_handle_array.c | 13 struct vmci_handle_arr *array; in vmci_handle_arr_create() local 22 array = kmalloc(struct_size(array, entries, capacity), GFP_ATOMIC); in vmci_handle_arr_create() 23 if (!array) in vmci_handle_arr_create() 26 array->capacity = capacity; in vmci_handle_arr_create() 27 array->max_capacity = max_capacity; in vmci_handle_arr_create() 28 array->size = 0; in vmci_handle_arr_create() 30 return array; in vmci_handle_arr_create() 33 void vmci_handle_arr_destroy(struct vmci_handle_arr *array) in vmci_handle_arr_destroy() argument 35 kfree(array); in vmci_handle_arr_destroy() 41 struct vmci_handle_arr *array = *array_ptr; in vmci_handle_arr_append_entry() local [all …]
|
| H A D | vmci_handle_array.h | 23 /* Select a default capacity that results in a 64 byte sized array */ 27 void vmci_handle_arr_destroy(struct vmci_handle_arr *array); 30 struct vmci_handle vmci_handle_arr_remove_entry(struct vmci_handle_arr *array, 33 struct vmci_handle vmci_handle_arr_remove_tail(struct vmci_handle_arr *array); 35 vmci_handle_arr_get_entry(const struct vmci_handle_arr *array, u32 index); 36 bool vmci_handle_arr_has_entry(const struct vmci_handle_arr *array, 38 struct vmci_handle *vmci_handle_arr_get_handles(struct vmci_handle_arr *array); 41 const struct vmci_handle_arr *array) in vmci_handle_arr_get_size() argument 43 return array->size; in vmci_handle_arr_get_size()
|
| /linux/fs/xfs/scrub/ |
| H A D | xfarray.c | 19 * This memory array uses an xfile (which itself is a shmem 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 …]
|
| /linux/sound/hda/core/ |
| H A D | array.c | 11 * 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/drivers/md/persistent-data/ |
| H A D | dm-array.h | 15 * 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/kernel/bpf/ |
| H A D | reuseport_array.c | 52 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/drivers/accel/habanalabs/common/ |
| H A D | security.c | 40 * hl_get_pb_block - return the relevant block within the block array 44 * @pb_blocks: blocks array 45 * @array_size: blocks array size 72 * @sgs_entry: pb array 98 * @pb_blocks: blocks array 99 * @sgs_array: pb array 100 * @array_size: blocks array size 127 * @pb_blocks: blocks array 128 * @sgs_array: pb array 129 * @array_size: blocks array size [all …]
|
| /linux/kernel/ |
| H A D | stacktrace.c | 20 * @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/Documentation/core-api/ |
| H A D | assoc_array.rst | 2 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/include/linux/ |
| H A D | dma-fence-array.h | 3 * 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 36 * @callbacks: array of callback helpers 68 * dma_fence_array_for_each - iterate over all fences in array [all …]
|
| H A D | assoc_array.h | 2 /* 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 …]
|
| H A D | overflow.h | 388 * array_size() - Calculate size of 2-dimensional array. 392 * Calculates size of 2-dimensional array: @a * @b. 394 * Returns: number of bytes needed to represent the array or SIZE_MAX on 400 * array3_size() - Calculate size of 3-dimensional array. 405 * Calculates size of 3-dimensional array: @a * @b * @c. 407 * Returns: number of bytes needed to represent the array or SIZE_MAX on 413 * flex_array_size() - Calculate size of a flexible array member 416 * @member: Name of the flexible array member. 417 * @count: Number of elements in the array. 419 * Calculates size of a flexible array of @count number of @member [all …]
|
| /linux/drivers/infiniband/hw/mthca/ |
| H A D | mthca_allocator.c | 106 * 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/drivers/gpu/drm/msm/registers/display/ |
| H A D | mdp4.xml | 155 <array offsets="0x10000,0x18000,0x88000" name="OVLP" length="3" stride="0x8000"> 162 <array offsets="0x0104,0x0124,0x0144,0x0160" name="STAGE" length="4" stride="0x1c"> 179 </array> 181 <array offsets="0x1004,0x1404,0x1804,0x1b84" name="STAGE_CO3" length="4" stride="4"> 185 </array> 194 <array offset="0x2000" name="CSC" length="1" stride="0x700"> 195 <array offset="0x400" name="MV" length="9" stride="4"> 197 </array> 198 <array offset="0x500" name="PRE_BV" length="3" stride="4"> 200 </array> [all …]
|
| /linux/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/ |
| H A D | pwrseq.c | 8 /* 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/scripts/coccinelle/misc/ |
| H A D | flexible_array.cocci | 5 /// 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/fs/nfs/ |
| H A D | pnfs_nfs.c | 132 struct pnfs_commit_array *array; in pnfs_find_commit_array_by_lseg() local 134 list_for_each_entry_rcu(array, &fl_cinfo->commits, cinfo_list) { in pnfs_find_commit_array_by_lseg() 135 if (array->lseg == lseg) in pnfs_find_commit_array_by_lseg() 136 return array; in pnfs_find_commit_array_by_lseg() 146 struct pnfs_commit_array *array; in pnfs_add_commit_array() local 148 array = pnfs_find_commit_array_by_lseg(fl_cinfo, lseg); in pnfs_add_commit_array() 149 if (array) in pnfs_add_commit_array() 150 return array; in pnfs_add_commit_array() 163 struct pnfs_commit_array *array; in pnfs_lookup_commit_array() local 166 array = pnfs_find_commit_array_by_lseg(fl_cinfo, lseg); in pnfs_lookup_commit_array() [all …]
|
| /linux/kernel/trace/ |
| H A D | tracing_map.h | 25 * 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 …]
|
| /linux/lib/ |
| H A D | assoc_array.c | 2 /* Generic associative array implementation. 16 * Iterate over an associative array. The caller must hold the RCU read lock 111 * assoc_array_iterate - Pass all objects in the array to a callback 112 * @array: The array to iterate over. 116 * Iterate over all the objects in an associative array. Each one will be 119 * If the array is being modified concurrently with the iteration then it is 120 * possible that some objects in the array will be passed to the iterator 125 * The function will return 0 if no objects were in the array or else it will 133 int assoc_array_iterate(const struct assoc_array *array, in assoc_array_iterate() argument 138 struct assoc_array_ptr *root = READ_ONCE(array->root); /* Address dependency. */ in assoc_array_iterate() [all …]
|
| H A D | string_helpers.c | 141 int parse_int_array(const char *buf, size_t count, int **array) in parse_int_array() argument 154 *array = ints; in parse_int_array() 164 * @array: Returned pointer to sequence of integers 166 * On success @array is allocated and initialized with a sequence of 170 * Caller takes responsibility for freeing @array when it is no longer 173 int parse_int_array_user(const char __user *from, size_t count, int **array) in parse_int_array_user() argument 182 ret = parse_int_array(buf, count, array); in parse_int_array_user() 751 * kasprintf_strarray - allocate and fill array of sequential strings 760 * Returns array of strings or NULL when memory can't be allocated. 785 * in an array and the array itself [all …]
|
| /linux/drivers/gpu/drm/imagination/ |
| H A D | pvr_sync.c | 48 pvr_sync_signal_array_cleanup(struct xarray *array) in pvr_sync_signal_array_cleanup() argument 53 xa_for_each(array, i, sig_sync) in pvr_sync_signal_array_cleanup() 56 xa_destroy(array); in pvr_sync_signal_array_cleanup() 60 pvr_sync_signal_array_add(struct xarray *array, struct drm_file *file, u32 handle, u64 point) in pvr_sync_signal_array_add() argument 95 err = xa_alloc(array, &id, sig_sync, xa_limit_32b, GFP_KERNEL); in pvr_sync_signal_array_add() 107 pvr_sync_signal_array_search(struct xarray *array, u32 handle, u64 point) in pvr_sync_signal_array_search() argument 112 xa_for_each(array, i, sig_sync) { in pvr_sync_signal_array_search() 121 pvr_sync_signal_array_get(struct xarray *array, struct drm_file *file, u32 handle, u64 point) in pvr_sync_signal_array_get() argument 125 sig_sync = pvr_sync_signal_array_search(array, handle, point); in pvr_sync_signal_array_get() 129 return pvr_sync_signal_array_add(array, file, handle, point); in pvr_sync_signal_array_get() [all …]
|
| /linux/tools/perf/util/ |
| H A D | synthetic-events.c | 1577 __u64 *array, u64 type __maybe_unused) in perf_synthesize_sample_weight() argument 1579 *array = data->weight; in perf_synthesize_sample_weight() 1582 *array &= 0xffffffff; in perf_synthesize_sample_weight() 1583 *array |= ((u64)data->ins_lat << 32); in perf_synthesize_sample_weight() 1584 *array |= ((u64)data->weight3 << 48); in perf_synthesize_sample_weight() 1588 static __u64 *copy_read_group_values(__u64 *array, __u64 read_format, in copy_read_group_values() argument 1596 memcpy(array, v, sz); in copy_read_group_values() 1597 array = (void *)array + sz; in copy_read_group_values() 1599 return array; in copy_read_group_values() 1605 __u64 *array; in perf_event__synthesize_sample() local [all …]
|
| /linux/Documentation/devicetree/bindings/usb/ |
| H A D | brcm,usb-pinmap.yaml | 27 description: Array of one or two GPIO pins used for input signals. 30 $ref: /schemas/types.yaml#/definitions/string-array 31 description: Array of input signal names, one per gpio in in-gpios. 34 $ref: /schemas/types.yaml#/definitions/uint32-array 35 description: Array of enable and mask pairs, one per gpio in-gpios. 39 description: Array of one GPIO pin used for output signals. 42 $ref: /schemas/types.yaml#/definitions/string-array 43 description: Array of output signal names, one per gpio in out-gpios. 46 $ref: /schemas/types.yaml#/definitions/uint32-array 47 description: Array of enable, value, changed and clear masks, one
|
| /linux/scripts/ |
| H A D | tracepoint-update.c | 35 const char **array; member 44 const char **array = *vals; in add_string() local 49 array = realloc(array, sizeof(char *) * size); in add_string() 50 if (!array) { in add_string() 54 *vals = array; in add_string() 57 array[(*count)++] = str; in add_string() 86 etrace->array = NULL; in make_trace_array() 90 * names of tracepoints (in tracepoint_strings). Create an array in make_trace_array() 91 * that points to each string and then sort the array. in make_trace_array() 106 etrace->array = vals; in make_trace_array() [all …]
|