Home
last modified time | relevance | path

Searched refs:array (Results 1 – 25 of 764) sorted by relevance

12345678910>>...31

/Linux-v4.19/drivers/misc/vmw_vmci/
Dvmci_handle_array.c27 struct vmci_handle_arr *array; in vmci_handle_arr_create() local
32 array = kmalloc(handle_arr_calc_size(capacity), GFP_ATOMIC); in vmci_handle_arr_create()
33 if (!array) in vmci_handle_arr_create()
36 array->capacity = capacity; in vmci_handle_arr_create()
37 array->size = 0; in vmci_handle_arr_create()
39 return array; in vmci_handle_arr_create()
42 void vmci_handle_arr_destroy(struct vmci_handle_arr *array) in vmci_handle_arr_destroy() argument
44 kfree(array); in vmci_handle_arr_destroy()
50 struct vmci_handle_arr *array = *array_ptr; in vmci_handle_arr_append_entry() local
52 if (unlikely(array->size >= array->capacity)) { in vmci_handle_arr_append_entry()
[all …]
Dvmci_handle_array.h32 void vmci_handle_arr_destroy(struct vmci_handle_arr *array);
35 struct vmci_handle vmci_handle_arr_remove_entry(struct vmci_handle_arr *array,
38 struct vmci_handle vmci_handle_arr_remove_tail(struct vmci_handle_arr *array);
40 vmci_handle_arr_get_entry(const struct vmci_handle_arr *array, size_t index);
41 bool vmci_handle_arr_has_entry(const struct vmci_handle_arr *array,
43 struct vmci_handle *vmci_handle_arr_get_handles(struct vmci_handle_arr *array);
46 const struct vmci_handle_arr *array) in vmci_handle_arr_get_size() argument
48 return array->size; in vmci_handle_arr_get_size()
/Linux-v4.19/drivers/dma-buf/
Ddma-fence-array.c36 struct dma_fence_array *array = container_of(wrk, typeof(*array), work); in irq_dma_fence_array_work() local
38 dma_fence_signal(&array->base); in irq_dma_fence_array_work()
39 dma_fence_put(&array->base); in irq_dma_fence_array_work()
47 struct dma_fence_array *array = array_cb->array; in dma_fence_array_cb_func() local
49 if (atomic_dec_and_test(&array->num_pending)) in dma_fence_array_cb_func()
50 irq_work_queue(&array->work); in dma_fence_array_cb_func()
52 dma_fence_put(&array->base); in dma_fence_array_cb_func()
57 struct dma_fence_array *array = to_dma_fence_array(fence); in dma_fence_array_enable_signaling() local
58 struct dma_fence_array_cb *cb = (void *)(&array[1]); in dma_fence_array_enable_signaling()
61 for (i = 0; i < array->num_fences; ++i) { in dma_fence_array_enable_signaling()
[all …]
/Linux-v4.19/sound/hda/
Darray.c18 void *snd_array_new(struct snd_array *array) in snd_array_new() argument
20 if (snd_BUG_ON(!array->elem_size)) in snd_array_new()
22 if (array->used >= array->alloced) { in snd_array_new()
23 int num = array->alloced + array->alloc_align; in snd_array_new()
24 int oldsize = array->alloced * array->elem_size; in snd_array_new()
25 int size = (num + 1) * array->elem_size; in snd_array_new()
29 nlist = krealloc(array->list, size, GFP_KERNEL); in snd_array_new()
33 array->list = nlist; in snd_array_new()
34 array->alloced = num; in snd_array_new()
36 return snd_array_elem(array, array->used++); in snd_array_new()
[all …]
/Linux-v4.19/kernel/bpf/
Darraymap.c27 static void bpf_array_free_percpu(struct bpf_array *array) in bpf_array_free_percpu() argument
31 for (i = 0; i < array->map.max_entries; i++) { in bpf_array_free_percpu()
32 free_percpu(array->pptrs[i]); in bpf_array_free_percpu()
37 static int bpf_array_alloc_percpu(struct bpf_array *array) in bpf_array_alloc_percpu() argument
42 for (i = 0; i < array->map.max_entries; i++) { in bpf_array_alloc_percpu()
43 ptr = __alloc_percpu_gfp(array->elem_size, 8, in bpf_array_alloc_percpu()
46 bpf_array_free_percpu(array); in bpf_array_alloc_percpu()
49 array->pptrs[i] = ptr; in bpf_array_alloc_percpu()
85 struct bpf_array *array; in array_map_alloc() local
110 array_size = sizeof(*array); in array_map_alloc()
[all …]
Dreuseport_array.c51 struct reuseport_array *array = reuseport_array(map); in reuseport_array_lookup_elem() local
54 if (unlikely(index >= array->map.max_entries)) in reuseport_array_lookup_elem()
57 return rcu_dereference(array->ptrs[index]); in reuseport_array_lookup_elem()
63 struct reuseport_array *array = reuseport_array(map); in reuseport_array_delete_elem() local
71 if (!rcu_access_pointer(array->ptrs[index])) in reuseport_array_delete_elem()
76 sk = rcu_dereference_protected(array->ptrs[index], in reuseport_array_delete_elem()
81 RCU_INIT_POINTER(array->ptrs[index], NULL); in reuseport_array_delete_elem()
95 struct reuseport_array *array = reuseport_array(map); in reuseport_array_free() local
128 sk = rcu_dereference(array->ptrs[i]); in reuseport_array_free()
138 RCU_INIT_POINTER(array->ptrs[i], NULL); in reuseport_array_free()
[all …]
/Linux-v4.19/tools/perf/util/
Devsel.c2003 const u64 *array = event->sample.array; in perf_evsel__parse_id_sample() local
2007 array += ((event->header.size - in perf_evsel__parse_id_sample()
2011 sample->id = *array; in perf_evsel__parse_id_sample()
2012 array--; in perf_evsel__parse_id_sample()
2016 u.val64 = *array; in perf_evsel__parse_id_sample()
2024 array--; in perf_evsel__parse_id_sample()
2028 sample->stream_id = *array; in perf_evsel__parse_id_sample()
2029 array--; in perf_evsel__parse_id_sample()
2033 sample->id = *array; in perf_evsel__parse_id_sample()
2034 array--; in perf_evsel__parse_id_sample()
[all …]
Dparse-events.y95 %type <array> array
96 %type <array> array_term
97 %type <array> array_terms
109 struct parse_events_array array; member
614 PE_NAME array '=' PE_NAME
622 term->array = $2;
626 PE_NAME array '=' PE_VALUE
632 term->array = $2;
645 array:
680 struct parse_events_array array; variable
[all …]
/Linux-v4.19/drivers/infiniband/hw/mthca/
Dmthca_allocator.c118 void *mthca_array_get(struct mthca_array *array, int index) in mthca_array_get() argument
122 if (array->page_list[p].page) in mthca_array_get()
123 return array->page_list[p].page[index & MTHCA_ARRAY_MASK]; in mthca_array_get()
128 int mthca_array_set(struct mthca_array *array, int index, void *value) in mthca_array_set() argument
133 if (!array->page_list[p].page) in mthca_array_set()
134 array->page_list[p].page = (void **) get_zeroed_page(GFP_ATOMIC); in mthca_array_set()
136 if (!array->page_list[p].page) in mthca_array_set()
139 array->page_list[p].page[index & MTHCA_ARRAY_MASK] = value; in mthca_array_set()
140 ++array->page_list[p].used; in mthca_array_set()
145 void mthca_array_clear(struct mthca_array *array, int index) in mthca_array_clear() argument
[all …]
/Linux-v4.19/include/linux/
Dassoc_array.h58 static inline void assoc_array_init(struct assoc_array *array) in assoc_array_init() argument
60 array->root = NULL; in assoc_array_init()
61 array->nr_leaves_on_tree = 0; in assoc_array_init()
64 extern int assoc_array_iterate(const struct assoc_array *array,
68 extern void *assoc_array_find(const struct assoc_array *array,
71 extern void assoc_array_destroy(struct assoc_array *array,
73 extern struct assoc_array_edit *assoc_array_insert(struct assoc_array *array,
79 extern struct assoc_array_edit *assoc_array_delete(struct assoc_array *array,
82 extern struct assoc_array_edit *assoc_array_clear(struct assoc_array *array,
86 extern int assoc_array_gc(struct assoc_array *array,
/Linux-v4.19/drivers/ras/
Dcec.c90 u64 *array; /* container page */ member
146 u8 decay = DECAY(ca->array[i]); in do_spring_cleaning()
153 ca->array[i] &= ~(DECAY_MASK << COUNT_BITS); in do_spring_cleaning()
154 ca->array[i] |= (decay << COUNT_BITS); in do_spring_cleaning()
192 this_pfn = PFN(ca->array[tmp]); in __find_elem()
207 this_pfn = PFN(ca->array[min]); in __find_elem()
230 memmove((void *)&ca->array[idx], in del_elem()
231 (void *)&ca->array[idx + 1], in del_elem()
243 unsigned int this = FULL_COUNT(ca->array[i]); in del_lru_elem_unlocked()
253 return PFN(ca->array[min_idx]); in del_lru_elem_unlocked()
[all …]
/Linux-v4.19/arch/s390/tools/
Dgen_facilities.c118 unsigned long long *array; in print_facility_list() local
120 array = calloc(1, 8); in print_facility_list()
121 if (!array) in print_facility_list()
128 array = realloc(array, (dword + 1) * 8); in print_facility_list()
129 if (!array) in print_facility_list()
131 memset(array + high + 1, 0, (dword - high) * 8); in print_facility_list()
134 array[dword] |= 1ULL << bit; in print_facility_list()
138 printf("_AC(0x%016llx,UL)%c", array[i], i < high ? ',' : '\n'); in print_facility_list()
139 free(array); in print_facility_list()
/Linux-v4.19/drivers/scsi/isci/
Dunsolicited_frame_control.c85 uf_control->headers.array = virt + SCI_UFI_BUF_SIZE; in sci_unsolicited_frame_control_construct()
95 uf_control->address_table.array = virt + SCI_UFI_BUF_SIZE + SCI_UFI_HDR_SIZE; in sci_unsolicited_frame_control_construct()
110 uf = &uf_control->buffers.array[i]; in sci_unsolicited_frame_control_construct()
112 uf_control->address_table.array[i] = dma; in sci_unsolicited_frame_control_construct()
115 uf->header = &uf_control->headers.array[i]; in sci_unsolicited_frame_control_construct()
136 *frame_header = &uf_control->buffers.array[frame_index].header->data; in sci_unsolicited_frame_control_get_header()
149 *frame_buffer = uf_control->buffers.array[frame_index].buffer; in sci_unsolicited_frame_control_get_buffer()
171 while (lower_32_bits(uf_control->address_table.array[frame_get]) == 0 && in sci_unsolicited_frame_control_release_frame()
172 upper_32_bits(uf_control->address_table.array[frame_get]) == 0 && in sci_unsolicited_frame_control_release_frame()
184 uf_control->buffers.array[frame_index].state = UNSOLICITED_FRAME_RELEASED; in sci_unsolicited_frame_control_release_frame()
[all …]
/Linux-v4.19/Documentation/core-api/
Dflexible-arrays.rst17 together an array from smaller parts; the flexible array library exists to make
20 A flexible array holds an arbitrary (within limits) number of fixed-sized
25 system page size, and putting data into a flexible array requires a copy
27 locking at all; if concurrent access to an array is possible, then the
30 The creation of a flexible array is done with :c:func:`flex_array_alloc()`::
39 maximum number of objects which can be stored in the array. The flags
48 This macro will result in a definition of an array with the given name; the
51 Storing data into a flexible array is accomplished with a call to
54 int flex_array_put(struct flex_array *array, unsigned int element_nr,
57 This call will copy the data from src into the array, in the position
[all …]
/Linux-v4.19/Documentation/
Dflexible-arrays.txt19 piecing together an array from smaller parts; the flexible array library
22 A flexible array holds an arbitrary (within limits) number of fixed-sized
27 system page size, and putting data into a flexible array requires a copy
29 locking at all; if concurrent access to an array is possible, then the
32 The creation of a flexible array is done with::
41 maximum number of objects which can be stored in the array. The flags
50 This macro will result in a definition of an array with the given name; the
53 Storing data into a flexible array is accomplished with a call to::
55 int flex_array_put(struct flex_array *array, unsigned int element_nr,
58 This call will copy the data from src into the array, in the position
[all …]
/Linux-v4.19/drivers/media/usb/gspca/stv06xx/
Dstv06xx_hdcs.c75 } array; member
296 if (width > hdcs->array.width) in hdcs_set_size()
297 width = hdcs->array.width; in hdcs_set_size()
301 if (height + 2 * hdcs->array.border + HDCS_1020_BOTTOM_Y_SKIP in hdcs_set_size()
302 > hdcs->array.height) in hdcs_set_size()
303 height = hdcs->array.height - 2 * hdcs->array.border - in hdcs_set_size()
306 y = (hdcs->array.height - HDCS_1020_BOTTOM_Y_SKIP - height) / 2 in hdcs_set_size()
307 + hdcs->array.top; in hdcs_set_size()
309 if (height > hdcs->array.height) in hdcs_set_size()
310 height = hdcs->array.height; in hdcs_set_size()
[all …]
/Linux-v4.19/drivers/gpio/
Dgpiolib-legacy.c84 int gpio_request_array(const struct gpio *array, size_t num) in gpio_request_array() argument
88 for (i = 0; i < num; i++, array++) { in gpio_request_array()
89 err = gpio_request_one(array->gpio, array->flags, array->label); in gpio_request_array()
97 gpio_free((--array)->gpio); in gpio_request_array()
107 void gpio_free_array(const struct gpio *array, size_t num) in gpio_free_array() argument
110 gpio_free((array++)->gpio); in gpio_free_array()
/Linux-v4.19/drivers/staging/rtlwifi/phydm/rtl8822b/
Dhalhwimg8822b_bb.c1343 u32 *array = array_mp_8822b_agc_tab; in odm_read_and_config_mp_8822b_agc_tab() local
1351 v1 = array[i]; in odm_read_and_config_mp_8822b_agc_tab()
1352 v2 = array[i + 1]; in odm_read_and_config_mp_8822b_agc_tab()
1835 u32 *array = array_mp_8822b_phy_reg; in odm_read_and_config_mp_8822b_phy_reg() local
1843 v1 = array[i]; in odm_read_and_config_mp_8822b_phy_reg()
1844 v2 = array[i + 1]; in odm_read_and_config_mp_8822b_phy_reg()
1938 u32 *array = array_mp_8822b_phy_reg_pg; in odm_read_and_config_mp_8822b_phy_reg_pg() local
1947 u32 v1 = array[i]; in odm_read_and_config_mp_8822b_phy_reg_pg()
1948 u32 v2 = array[i + 1]; in odm_read_and_config_mp_8822b_phy_reg_pg()
1949 u32 v3 = array[i + 2]; in odm_read_and_config_mp_8822b_phy_reg_pg()
[all …]
/Linux-v4.19/Documentation/RCU/
DarrayRCU.txt14 array that is separately indexed. It might be tempting to consider use
15 of RCU to instead protect the index into an array, however, this use
30 Hash tables are often implemented as an array, where each array entry
33 to other array-of-list situations, such as radix trees.
39 located in each array element, and where the array is never resized,
51 function formerly used by the System V IPC code. The array is used
60 the new array, and invokes ipc_rcu_putref() to free up the old array.
92 * contents of the new array are visible before the new
93 * array becomes visible.
101 The ipc_rcu_putref() function decrements the array's reference count
[all …]
/Linux-v4.19/drivers/net/wireless/ath/ath9k/
Dcalib.h36 #define STATIC_INI_ARRAY(array) { \ argument
37 .ia_array = (u32 *)(array), \
38 .ia_rows = ARRAY_SIZE(array), \
39 .ia_columns = ARRAY_SIZE(array[0]), \
42 #define INIT_INI_ARRAY(iniarray, array) do { \ argument
43 (iniarray)->ia_array = (u32 *)(array); \
44 (iniarray)->ia_rows = ARRAY_SIZE(array); \
45 (iniarray)->ia_columns = ARRAY_SIZE(array[0]); \
/Linux-v4.19/kernel/trace/
Dtracing_map.h173 #define TRACING_MAP_ARRAY_ELT(array, idx) \ argument
174 (array->pages[idx >> array->entry_shift] + \
175 ((idx & array->entry_mask) << array->entry_size_shift))
177 #define TRACING_MAP_ENTRY(array, idx) \ argument
178 ((struct tracing_map_entry *)TRACING_MAP_ARRAY_ELT(array, idx))
180 #define TRACING_MAP_ELT(array, idx) \ argument
181 ((struct tracing_map_elt **)TRACING_MAP_ARRAY_ELT(array, idx))
/Linux-v4.19/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-v4.19/fs/dlm/
Dmember.c64 struct rcom_slot *ro0, struct dlm_slot *array, in log_slots() argument
74 if (array) { in log_slots()
76 if (!array[i].nodeid) in log_slots()
80 array[i].slot, array[i].nodeid); in log_slots()
170 struct dlm_slot *array; in dlm_slots_assign() local
220 array = kcalloc(array_size, sizeof(*array), GFP_NOFS); in dlm_slots_assign()
221 if (!array) in dlm_slots_assign()
234 kfree(array); in dlm_slots_assign()
238 array[memb->slot - 1].nodeid = memb->nodeid; in dlm_slots_assign()
239 array[memb->slot - 1].slot = memb->slot; in dlm_slots_assign()
[all …]
/Linux-v4.19/tools/virtio/ringtest/
Dptr_ring.c116 static struct ptr_ring array ____cacheline_aligned_in_smp;
121 int ret = ptr_ring_init(&array, ring_size, 0); in alloc_ring()
125 array.batch = param; in alloc_ring()
133 ret = __ptr_ring_produce(&array, buf); in add_inbuf()
152 if (tailcnt == headcnt || __ptr_ring_full(&array)) in get_buf()
164 return (tailcnt == headcnt || __ptr_ring_full(&array)); in used_empty()
195 return __ptr_ring_empty(&array); in avail_empty()
202 ptr = __ptr_ring_consume(&array); in use_buf()
/Linux-v4.19/include/media/
Dv4l2-common.h336 #define v4l2_find_nearest_size(array, array_size, width_field, height_field, \ argument
339 BUILD_BUG_ON(sizeof((array)->width_field) != sizeof(u32) || \
340 sizeof((array)->height_field) != sizeof(u32)); \
341 (typeof(&(array)[0]))__v4l2_find_nearest_size( \
342 (array), array_size, sizeof(*(array)), \
343 offsetof(typeof(*(array)), width_field), \
344 offsetof(typeof(*(array)), height_field), \
348 __v4l2_find_nearest_size(const void *array, size_t array_size,

12345678910>>...31