Home
last modified time | relevance | path

Searched refs:alloc (Results 1 - 25 of 908) sorted by relevance

12345678910>>...37

/kernel/linux/linux-5.10/drivers/infiniband/hw/cxgb4/
H A Did_table.c44 u32 c4iw_id_alloc(struct c4iw_id_table *alloc) in c4iw_id_alloc() argument
49 spin_lock_irqsave(&alloc->lock, flags); in c4iw_id_alloc()
51 obj = find_next_zero_bit(alloc->table, alloc->max, alloc->last); in c4iw_id_alloc()
52 if (obj >= alloc->max) in c4iw_id_alloc()
53 obj = find_first_zero_bit(alloc->table, alloc->max); in c4iw_id_alloc()
55 if (obj < alloc->max) { in c4iw_id_alloc()
56 if (alloc in c4iw_id_alloc()
71 c4iw_id_free(struct c4iw_id_table *alloc, u32 obj) c4iw_id_free() argument
82 c4iw_id_table_alloc(struct c4iw_id_table *alloc, u32 start, u32 num, u32 reserved, u32 flags) c4iw_id_table_alloc() argument
108 c4iw_id_table_free(struct c4iw_id_table *alloc) c4iw_id_table_free() argument
[all...]
/kernel/linux/linux-6.6/drivers/infiniband/hw/cxgb4/
H A Did_table.c44 u32 c4iw_id_alloc(struct c4iw_id_table *alloc) in c4iw_id_alloc() argument
49 spin_lock_irqsave(&alloc->lock, flags); in c4iw_id_alloc()
51 obj = find_next_zero_bit(alloc->table, alloc->max, alloc->last); in c4iw_id_alloc()
52 if (obj >= alloc->max) in c4iw_id_alloc()
53 obj = find_first_zero_bit(alloc->table, alloc->max); in c4iw_id_alloc()
55 if (obj < alloc->max) { in c4iw_id_alloc()
56 if (alloc in c4iw_id_alloc()
71 c4iw_id_free(struct c4iw_id_table *alloc, u32 obj) c4iw_id_free() argument
82 c4iw_id_table_alloc(struct c4iw_id_table *alloc, u32 start, u32 num, u32 reserved, u32 flags) c4iw_id_table_alloc() argument
103 c4iw_id_table_free(struct c4iw_id_table *alloc) c4iw_id_table_free() argument
[all...]
/kernel/linux/linux-6.6/drivers/android/
H A Dbinder_alloc.c60 static size_t binder_alloc_buffer_size(struct binder_alloc *alloc, in binder_alloc_buffer_size() argument
63 if (list_is_last(&buffer->entry, &alloc->buffers)) in binder_alloc_buffer_size()
64 return alloc->buffer + alloc->buffer_size - buffer->user_data; in binder_alloc_buffer_size()
68 static void binder_insert_free_buffer(struct binder_alloc *alloc, in binder_insert_free_buffer() argument
71 struct rb_node **p = &alloc->free_buffers.rb_node; in binder_insert_free_buffer()
79 new_buffer_size = binder_alloc_buffer_size(alloc, new_buffer); in binder_insert_free_buffer()
83 alloc->pid, new_buffer_size, new_buffer); in binder_insert_free_buffer()
90 buffer_size = binder_alloc_buffer_size(alloc, buffer); in binder_insert_free_buffer()
98 rb_insert_color(&new_buffer->rb_node, &alloc in binder_insert_free_buffer()
101 binder_insert_allocated_buffer_locked( struct binder_alloc *alloc, struct binder_buffer *new_buffer) binder_insert_allocated_buffer_locked() argument
126 binder_alloc_prepare_to_free_locked( struct binder_alloc *alloc, uintptr_t user_ptr) binder_alloc_prepare_to_free_locked() argument
170 binder_alloc_prepare_to_free(struct binder_alloc *alloc, uintptr_t user_ptr) binder_alloc_prepare_to_free() argument
181 binder_update_page_range(struct binder_alloc *alloc, int allocate, void __user *start, void __user *end) binder_update_page_range() argument
312 binder_alloc_set_vma(struct binder_alloc *alloc, struct vm_area_struct *vma) binder_alloc_set_vma() argument
319 binder_alloc_get_vma( struct binder_alloc *alloc) binder_alloc_get_vma() argument
326 debug_low_async_space_locked(struct binder_alloc *alloc, int pid) debug_low_async_space_locked() argument
368 binder_alloc_new_buf_locked( struct binder_alloc *alloc, size_t data_size, size_t offsets_size, size_t extra_buffers_size, int is_async, int pid) binder_alloc_new_buf_locked() argument
561 binder_alloc_new_buf(struct binder_alloc *alloc, size_t data_size, size_t offsets_size, size_t extra_buffers_size, int is_async, int pid) binder_alloc_new_buf() argument
588 binder_delete_free_buffer(struct binder_alloc *alloc, struct binder_buffer *buffer) binder_delete_free_buffer() argument
637 binder_free_buf_locked(struct binder_alloc *alloc, struct binder_buffer *buffer) binder_free_buf_locked() argument
701 binder_alloc_free_buf(struct binder_alloc *alloc, struct binder_buffer *buffer) binder_alloc_free_buf() argument
734 binder_alloc_mmap_handler(struct binder_alloc *alloc, struct vm_area_struct *vma) binder_alloc_mmap_handler() argument
804 binder_alloc_deferred_release(struct binder_alloc *alloc) binder_alloc_deferred_release() argument
888 binder_alloc_print_allocated(struct seq_file *m, struct binder_alloc *alloc) binder_alloc_print_allocated() argument
905 binder_alloc_print_pages(struct seq_file *m, struct binder_alloc *alloc) binder_alloc_print_pages() argument
941 binder_alloc_get_allocated_count(struct binder_alloc *alloc) binder_alloc_get_allocated_count() argument
962 binder_alloc_vma_close(struct binder_alloc *alloc) binder_alloc_vma_close() argument
986 struct binder_alloc *alloc; __must_hold() local
1071 binder_alloc_init(struct binder_alloc *alloc) binder_alloc_init() argument
1117 check_buffer(struct binder_alloc *alloc, struct binder_buffer *buffer, binder_size_t offset, size_t bytes) check_buffer() argument
1149 binder_alloc_get_page(struct binder_alloc *alloc, struct binder_buffer *buffer, binder_size_t buffer_offset, pgoff_t *pgoffp) binder_alloc_get_page() argument
1172 binder_alloc_clear_buf(struct binder_alloc *alloc, struct binder_buffer *buffer) binder_alloc_clear_buf() argument
1205 binder_alloc_copy_user_to_buffer(struct binder_alloc *alloc, struct binder_buffer *buffer, binder_size_t buffer_offset, const void __user *from, size_t bytes) binder_alloc_copy_user_to_buffer() argument
1236 binder_alloc_do_buffer_copy(struct binder_alloc *alloc, bool to_buffer, struct binder_buffer *buffer, binder_size_t buffer_offset, void *ptr, size_t bytes) binder_alloc_do_buffer_copy() argument
1267 binder_alloc_copy_to_buffer(struct binder_alloc *alloc, struct binder_buffer *buffer, binder_size_t buffer_offset, void *src, size_t bytes) binder_alloc_copy_to_buffer() argument
1277 binder_alloc_copy_from_buffer(struct binder_alloc *alloc, void *dest, struct binder_buffer *buffer, binder_size_t buffer_offset, size_t bytes) binder_alloc_copy_from_buffer() argument
[all...]
H A Dbinder_alloc_selftest.c82 pr_err("alloc sizes: "); in pr_err_size_seq()
92 static bool check_buffer_pages_allocated(struct binder_alloc *alloc, in check_buffer_pages_allocated() argument
103 page_index = (page_addr - alloc->buffer) / PAGE_SIZE; in check_buffer_pages_allocated()
104 if (!alloc->pages[page_index].page_ptr || in check_buffer_pages_allocated()
105 !list_empty(&alloc->pages[page_index].lru)) { in check_buffer_pages_allocated()
106 pr_err("expect alloc but is %s at page index %d\n", in check_buffer_pages_allocated()
107 alloc->pages[page_index].page_ptr ? in check_buffer_pages_allocated()
115 static void binder_selftest_alloc_buf(struct binder_alloc *alloc, in binder_selftest_alloc_buf() argument
122 buffers[i] = binder_alloc_new_buf(alloc, sizes[i], 0, 0, 0, 0); in binder_selftest_alloc_buf()
124 !check_buffer_pages_allocated(alloc, buffer in binder_selftest_alloc_buf()
132 binder_selftest_free_buf(struct binder_alloc *alloc, struct binder_buffer *buffers[], size_t *sizes, int *seq, size_t end) binder_selftest_free_buf() argument
156 binder_selftest_free_page(struct binder_alloc *alloc) binder_selftest_free_page() argument
176 binder_selftest_alloc_free(struct binder_alloc *alloc, size_t *sizes, int *seq, size_t end) binder_selftest_alloc_free() argument
205 binder_selftest_free_seq(struct binder_alloc *alloc, size_t *sizes, int *seq, int index, size_t end) binder_selftest_free_seq() argument
223 binder_selftest_alloc_size(struct binder_alloc *alloc, size_t *end_offset) binder_selftest_alloc_size() argument
249 binder_selftest_alloc_offset(struct binder_alloc *alloc, size_t *end_offset, int index) binder_selftest_alloc_offset() argument
283 binder_selftest_alloc(struct binder_alloc *alloc) binder_selftest_alloc() argument
[all...]
H A Dbinder_alloc.h23 * @entry: entry alloc->buffers
67 * @alloc: binder_alloc for a proc
72 struct binder_alloc *alloc; member
117 void binder_selftest_alloc(struct binder_alloc *alloc);
119 static inline void binder_selftest_alloc(struct binder_alloc *alloc) {} in binder_selftest_alloc() argument
124 extern struct binder_buffer *binder_alloc_new_buf(struct binder_alloc *alloc,
130 extern void binder_alloc_init(struct binder_alloc *alloc);
133 extern void binder_alloc_vma_close(struct binder_alloc *alloc);
135 binder_alloc_prepare_to_free(struct binder_alloc *alloc,
137 extern void binder_alloc_free_buf(struct binder_alloc *alloc,
155 binder_alloc_get_free_async_space(struct binder_alloc *alloc) binder_alloc_get_free_async_space() argument
[all...]
H A Dbinder_trace.h319 TP_PROTO(struct binder_alloc *alloc, bool allocate,
321 TP_ARGS(alloc, allocate, start, end),
329 __entry->proc = alloc->pid;
331 __entry->offset = start - alloc->buffer;
340 TP_PROTO(const struct binder_alloc *alloc, size_t page_index),
341 TP_ARGS(alloc, page_index),
347 __entry->proc = alloc->pid;
355 TP_PROTO(const struct binder_alloc *alloc, size_t page_index),
356 TP_ARGS(alloc, page_index));
359 TP_PROTO(const struct binder_alloc *alloc, size_
[all...]
/kernel/linux/linux-5.10/drivers/android/
H A Dbinder_alloc.c60 static size_t binder_alloc_buffer_size(struct binder_alloc *alloc, in binder_alloc_buffer_size() argument
63 if (list_is_last(&buffer->entry, &alloc->buffers)) in binder_alloc_buffer_size()
64 return alloc->buffer + alloc->buffer_size - buffer->user_data; in binder_alloc_buffer_size()
68 static void binder_insert_free_buffer(struct binder_alloc *alloc, in binder_insert_free_buffer() argument
71 struct rb_node **p = &alloc->free_buffers.rb_node; in binder_insert_free_buffer()
79 new_buffer_size = binder_alloc_buffer_size(alloc, new_buffer); in binder_insert_free_buffer()
83 alloc->pid, new_buffer_size, new_buffer); in binder_insert_free_buffer()
90 buffer_size = binder_alloc_buffer_size(alloc, buffer); in binder_insert_free_buffer()
98 rb_insert_color(&new_buffer->rb_node, &alloc in binder_insert_free_buffer()
101 binder_insert_allocated_buffer_locked( struct binder_alloc *alloc, struct binder_buffer *new_buffer) binder_insert_allocated_buffer_locked() argument
126 binder_alloc_prepare_to_free_locked( struct binder_alloc *alloc, uintptr_t user_ptr) binder_alloc_prepare_to_free_locked() argument
170 binder_alloc_prepare_to_free(struct binder_alloc *alloc, uintptr_t user_ptr) binder_alloc_prepare_to_free() argument
181 binder_update_page_range(struct binder_alloc *alloc, int allocate, void __user *start, void __user *end) binder_update_page_range() argument
313 binder_alloc_set_vma(struct binder_alloc *alloc, struct vm_area_struct *vma) binder_alloc_set_vma() argument
328 binder_alloc_get_vma( struct binder_alloc *alloc) binder_alloc_get_vma() argument
341 debug_low_async_space_locked(struct binder_alloc *alloc, int pid) debug_low_async_space_locked() argument
377 binder_alloc_new_buf_locked( struct binder_alloc *alloc, size_t data_size, size_t offsets_size, size_t extra_buffers_size, int is_async, int pid) binder_alloc_new_buf_locked() argument
566 binder_alloc_new_buf(struct binder_alloc *alloc, size_t data_size, size_t offsets_size, size_t extra_buffers_size, int is_async, int pid) binder_alloc_new_buf() argument
593 binder_delete_free_buffer(struct binder_alloc *alloc, struct binder_buffer *buffer) binder_delete_free_buffer() argument
642 binder_free_buf_locked(struct binder_alloc *alloc, struct binder_buffer *buffer) binder_free_buf_locked() argument
706 binder_alloc_free_buf(struct binder_alloc *alloc, struct binder_buffer *buffer) binder_alloc_free_buf() argument
739 binder_alloc_mmap_handler(struct binder_alloc *alloc, struct vm_area_struct *vma) binder_alloc_mmap_handler() argument
801 binder_alloc_deferred_release(struct binder_alloc *alloc) binder_alloc_deferred_release() argument
885 binder_alloc_print_allocated(struct seq_file *m, struct binder_alloc *alloc) binder_alloc_print_allocated() argument
902 binder_alloc_print_pages(struct seq_file *m, struct binder_alloc *alloc) binder_alloc_print_pages() argument
938 binder_alloc_get_allocated_count(struct binder_alloc *alloc) binder_alloc_get_allocated_count() argument
959 binder_alloc_vma_close(struct binder_alloc *alloc) binder_alloc_vma_close() argument
983 struct binder_alloc *alloc; __must_hold() local
1072 binder_alloc_init(struct binder_alloc *alloc) binder_alloc_init() argument
1116 check_buffer(struct binder_alloc *alloc, struct binder_buffer *buffer, binder_size_t offset, size_t bytes) check_buffer() argument
1148 binder_alloc_get_page(struct binder_alloc *alloc, struct binder_buffer *buffer, binder_size_t buffer_offset, pgoff_t *pgoffp) binder_alloc_get_page() argument
1171 binder_alloc_clear_buf(struct binder_alloc *alloc, struct binder_buffer *buffer) binder_alloc_clear_buf() argument
1207 binder_alloc_copy_user_to_buffer(struct binder_alloc *alloc, struct binder_buffer *buffer, binder_size_t buffer_offset, const void __user *from, size_t bytes) binder_alloc_copy_user_to_buffer() argument
1238 binder_alloc_do_buffer_copy(struct binder_alloc *alloc, bool to_buffer, struct binder_buffer *buffer, binder_size_t buffer_offset, void *ptr, size_t bytes) binder_alloc_do_buffer_copy() argument
1278 binder_alloc_copy_to_buffer(struct binder_alloc *alloc, struct binder_buffer *buffer, binder_size_t buffer_offset, void *src, size_t bytes) binder_alloc_copy_to_buffer() argument
1288 binder_alloc_copy_from_buffer(struct binder_alloc *alloc, void *dest, struct binder_buffer *buffer, binder_size_t buffer_offset, size_t bytes) binder_alloc_copy_from_buffer() argument
[all...]
H A Dbinder_alloc_selftest.c82 pr_err("alloc sizes: "); in pr_err_size_seq()
92 static bool check_buffer_pages_allocated(struct binder_alloc *alloc, in check_buffer_pages_allocated() argument
103 page_index = (page_addr - alloc->buffer) / PAGE_SIZE; in check_buffer_pages_allocated()
104 if (!alloc->pages[page_index].page_ptr || in check_buffer_pages_allocated()
105 !list_empty(&alloc->pages[page_index].lru)) { in check_buffer_pages_allocated()
106 pr_err("expect alloc but is %s at page index %d\n", in check_buffer_pages_allocated()
107 alloc->pages[page_index].page_ptr ? in check_buffer_pages_allocated()
115 static void binder_selftest_alloc_buf(struct binder_alloc *alloc, in binder_selftest_alloc_buf() argument
122 buffers[i] = binder_alloc_new_buf(alloc, sizes[i], 0, 0, 0, 0); in binder_selftest_alloc_buf()
124 !check_buffer_pages_allocated(alloc, buffer in binder_selftest_alloc_buf()
132 binder_selftest_free_buf(struct binder_alloc *alloc, struct binder_buffer *buffers[], size_t *sizes, int *seq, size_t end) binder_selftest_free_buf() argument
156 binder_selftest_free_page(struct binder_alloc *alloc) binder_selftest_free_page() argument
176 binder_selftest_alloc_free(struct binder_alloc *alloc, size_t *sizes, int *seq, size_t end) binder_selftest_alloc_free() argument
205 binder_selftest_free_seq(struct binder_alloc *alloc, size_t *sizes, int *seq, int index, size_t end) binder_selftest_free_seq() argument
223 binder_selftest_alloc_size(struct binder_alloc *alloc, size_t *end_offset) binder_selftest_alloc_size() argument
249 binder_selftest_alloc_offset(struct binder_alloc *alloc, size_t *end_offset, int index) binder_selftest_alloc_offset() argument
283 binder_selftest_alloc(struct binder_alloc *alloc) binder_selftest_alloc() argument
[all...]
H A Dbinder_alloc.h23 * @entry: entry alloc->buffers
64 * @alloc: binder_alloc for a proc
69 struct binder_alloc *alloc; member
113 void binder_selftest_alloc(struct binder_alloc *alloc);
115 static inline void binder_selftest_alloc(struct binder_alloc *alloc) {} in binder_selftest_alloc() argument
120 extern struct binder_buffer *binder_alloc_new_buf(struct binder_alloc *alloc,
126 extern void binder_alloc_init(struct binder_alloc *alloc);
129 extern void binder_alloc_vma_close(struct binder_alloc *alloc);
131 binder_alloc_prepare_to_free(struct binder_alloc *alloc,
133 extern void binder_alloc_free_buf(struct binder_alloc *alloc,
151 binder_alloc_get_free_async_space(struct binder_alloc *alloc) binder_alloc_get_free_async_space() argument
[all...]
H A Dbinder_trace.h286 TP_PROTO(struct binder_alloc *alloc, bool allocate,
288 TP_ARGS(alloc, allocate, start, end),
296 __entry->proc = alloc->pid;
298 __entry->offset = start - alloc->buffer;
307 TP_PROTO(const struct binder_alloc *alloc, size_t page_index),
308 TP_ARGS(alloc, page_index),
314 __entry->proc = alloc->pid;
322 TP_PROTO(const struct binder_alloc *alloc, size_t page_index),
323 TP_ARGS(alloc, page_index));
326 TP_PROTO(const struct binder_alloc *alloc, size_
[all...]
/kernel/linux/linux-5.10/sound/isa/gus/
H A Dgus_mem.c18 void snd_gf1_mem_lock(struct snd_gf1_mem * alloc, int xup) in snd_gf1_mem_lock() argument
21 mutex_lock(&alloc->memory_mutex); in snd_gf1_mem_lock()
23 mutex_unlock(&alloc->memory_mutex); in snd_gf1_mem_lock()
27 static struct snd_gf1_mem_block *snd_gf1_mem_xalloc(struct snd_gf1_mem * alloc, in snd_gf1_mem_xalloc() argument
36 pblock = alloc->first; in snd_gf1_mem_xalloc()
42 if (pblock == alloc->first) in snd_gf1_mem_xalloc()
43 alloc->first = nblock; in snd_gf1_mem_xalloc()
46 mutex_unlock(&alloc->memory_mutex); in snd_gf1_mem_xalloc()
52 if (alloc->last == NULL) { in snd_gf1_mem_xalloc()
54 alloc in snd_gf1_mem_xalloc()
63 snd_gf1_mem_xfree(struct snd_gf1_mem * alloc, struct snd_gf1_mem_block * block) snd_gf1_mem_xfree() argument
93 snd_gf1_mem_look(struct snd_gf1_mem * alloc, unsigned int address) snd_gf1_mem_look() argument
106 snd_gf1_mem_share(struct snd_gf1_mem * alloc, unsigned int *share_id) snd_gf1_mem_share() argument
121 snd_gf1_mem_find(struct snd_gf1_mem * alloc, struct snd_gf1_mem_block * block, unsigned int size, int w_16, int align) snd_gf1_mem_find() argument
173 snd_gf1_mem_alloc(struct snd_gf1_mem * alloc, int owner, char *name, int size, int w_16, int align, unsigned int *share_id) snd_gf1_mem_alloc() argument
207 snd_gf1_mem_free(struct snd_gf1_mem * alloc, unsigned int address) snd_gf1_mem_free() argument
224 struct snd_gf1_mem *alloc; snd_gf1_mem_init() local
255 struct snd_gf1_mem *alloc; snd_gf1_mem_done() local
273 struct snd_gf1_mem *alloc; snd_gf1_mem_info_read() local
[all...]
/kernel/linux/linux-6.6/sound/isa/gus/
H A Dgus_mem.c18 void snd_gf1_mem_lock(struct snd_gf1_mem * alloc, int xup) in snd_gf1_mem_lock() argument
21 mutex_lock(&alloc->memory_mutex); in snd_gf1_mem_lock()
23 mutex_unlock(&alloc->memory_mutex); in snd_gf1_mem_lock()
28 snd_gf1_mem_xalloc(struct snd_gf1_mem *alloc, struct snd_gf1_mem_block *block, in snd_gf1_mem_xalloc() argument
43 pblock = alloc->first; in snd_gf1_mem_xalloc()
49 if (pblock == alloc->first) in snd_gf1_mem_xalloc()
50 alloc->first = nblock; in snd_gf1_mem_xalloc()
53 mutex_unlock(&alloc->memory_mutex); in snd_gf1_mem_xalloc()
59 if (alloc->last == NULL) { in snd_gf1_mem_xalloc()
61 alloc in snd_gf1_mem_xalloc()
70 snd_gf1_mem_xfree(struct snd_gf1_mem * alloc, struct snd_gf1_mem_block * block) snd_gf1_mem_xfree() argument
100 snd_gf1_mem_look(struct snd_gf1_mem * alloc, unsigned int address) snd_gf1_mem_look() argument
113 snd_gf1_mem_share(struct snd_gf1_mem * alloc, unsigned int *share_id) snd_gf1_mem_share() argument
128 snd_gf1_mem_find(struct snd_gf1_mem * alloc, struct snd_gf1_mem_block * block, unsigned int size, int w_16, int align) snd_gf1_mem_find() argument
180 snd_gf1_mem_alloc(struct snd_gf1_mem * alloc, int owner, char *name, int size, int w_16, int align, unsigned int *share_id) snd_gf1_mem_alloc() argument
213 snd_gf1_mem_free(struct snd_gf1_mem * alloc, unsigned int address) snd_gf1_mem_free() argument
231 struct snd_gf1_mem *alloc; snd_gf1_mem_init() local
260 struct snd_gf1_mem *alloc; snd_gf1_mem_done() local
278 struct snd_gf1_mem *alloc; snd_gf1_mem_info_read() local
[all...]
/kernel/linux/linux-5.10/drivers/infiniband/hw/mthca/
H A Dmthca_allocator.c40 u32 mthca_alloc(struct mthca_alloc *alloc) in mthca_alloc() argument
45 spin_lock_irqsave(&alloc->lock, flags); in mthca_alloc()
47 obj = find_next_zero_bit(alloc->table, alloc->max, alloc->last); in mthca_alloc()
48 if (obj >= alloc->max) { in mthca_alloc()
49 alloc->top = (alloc->top + alloc->max) & alloc in mthca_alloc()
64 mthca_free(struct mthca_alloc *alloc, u32 obj) mthca_free() argument
79 mthca_alloc_init(struct mthca_alloc *alloc, u32 num, u32 mask, u32 reserved) mthca_alloc_init() argument
105 mthca_alloc_cleanup(struct mthca_alloc *alloc) mthca_alloc_cleanup() argument
[all...]
/kernel/linux/linux-6.6/drivers/infiniband/hw/mthca/
H A Dmthca_allocator.c40 u32 mthca_alloc(struct mthca_alloc *alloc) in mthca_alloc() argument
45 spin_lock_irqsave(&alloc->lock, flags); in mthca_alloc()
47 obj = find_next_zero_bit(alloc->table, alloc->max, alloc->last); in mthca_alloc()
48 if (obj >= alloc->max) { in mthca_alloc()
49 alloc->top = (alloc->top + alloc->max) & alloc in mthca_alloc()
64 mthca_free(struct mthca_alloc *alloc, u32 obj) mthca_free() argument
79 mthca_alloc_init(struct mthca_alloc *alloc, u32 num, u32 mask, u32 reserved) mthca_alloc_init() argument
100 mthca_alloc_cleanup(struct mthca_alloc *alloc) mthca_alloc_cleanup() argument
[all...]
/kernel/linux/linux-5.10/fs/ocfs2/
H A Dlocalalloc.c22 #include "alloc.h"
37 static u32 ocfs2_local_alloc_count_bits(struct ocfs2_dinode *alloc);
40 struct ocfs2_dinode *alloc,
44 static void ocfs2_clear_local_alloc(struct ocfs2_dinode *alloc);
48 struct ocfs2_dinode *alloc,
66 * the local alloc.
68 * Generally, we'd like to pick as large a local alloc as
74 * Some things work against us when trying to choose a large local alloc:
89 * alloc maximums at various cluster sizes (4k blocksize)
144 * local alloc siz in ocfs2_la_default_mb()
273 struct ocfs2_dinode *alloc = NULL; ocfs2_load_local_alloc() local
377 struct ocfs2_dinode *alloc = NULL; ocfs2_shutdown_local_alloc() local
485 struct ocfs2_dinode *alloc; ocfs2_begin_local_alloc_recovery() local
548 ocfs2_complete_local_alloc_recovery(struct ocfs2_super *osb, struct ocfs2_dinode *alloc) ocfs2_complete_local_alloc_recovery() argument
621 struct ocfs2_dinode *alloc; ocfs2_reserve_local_alloc_bits() local
725 struct ocfs2_dinode *alloc; ocfs2_claim_local_alloc_bits() local
781 struct ocfs2_dinode *alloc; ocfs2_free_local_alloc_bits() local
813 ocfs2_local_alloc_count_bits(struct ocfs2_dinode *alloc) ocfs2_local_alloc_count_bits() argument
824 ocfs2_local_alloc_find_clear_bits(struct ocfs2_super *osb, struct ocfs2_dinode *alloc, u32 *numbits, struct ocfs2_alloc_reservation *resv) ocfs2_local_alloc_find_clear_bits() argument
912 ocfs2_clear_local_alloc(struct ocfs2_dinode *alloc) ocfs2_clear_local_alloc() argument
949 ocfs2_sync_local_to_main(struct ocfs2_super *osb, handle_t *handle, struct ocfs2_dinode *alloc, struct inode *main_bm_inode, struct buffer_head *main_bm_bh) ocfs2_sync_local_to_main() argument
1154 struct ocfs2_dinode *alloc = NULL; ocfs2_local_alloc_new_window() local
1243 struct ocfs2_dinode *alloc; ocfs2_local_alloc_slide_window() local
[all...]
/kernel/linux/linux-6.6/fs/ocfs2/
H A Dlocalalloc.c20 #include "alloc.h"
35 static u32 ocfs2_local_alloc_count_bits(struct ocfs2_dinode *alloc);
38 struct ocfs2_dinode *alloc,
42 static void ocfs2_clear_local_alloc(struct ocfs2_dinode *alloc);
46 struct ocfs2_dinode *alloc,
64 * the local alloc.
66 * Generally, we'd like to pick as large a local alloc as
72 * Some things work against us when trying to choose a large local alloc:
87 * alloc maximums at various cluster sizes (4k blocksize)
142 * local alloc siz in ocfs2_la_default_mb()
271 struct ocfs2_dinode *alloc = NULL; ocfs2_load_local_alloc() local
375 struct ocfs2_dinode *alloc = NULL; ocfs2_shutdown_local_alloc() local
483 struct ocfs2_dinode *alloc; ocfs2_begin_local_alloc_recovery() local
546 ocfs2_complete_local_alloc_recovery(struct ocfs2_super *osb, struct ocfs2_dinode *alloc) ocfs2_complete_local_alloc_recovery() argument
619 struct ocfs2_dinode *alloc; ocfs2_reserve_local_alloc_bits() local
723 struct ocfs2_dinode *alloc; ocfs2_claim_local_alloc_bits() local
779 struct ocfs2_dinode *alloc; ocfs2_free_local_alloc_bits() local
811 ocfs2_local_alloc_count_bits(struct ocfs2_dinode *alloc) ocfs2_local_alloc_count_bits() argument
822 ocfs2_local_alloc_find_clear_bits(struct ocfs2_super *osb, struct ocfs2_dinode *alloc, u32 *numbits, struct ocfs2_alloc_reservation *resv) ocfs2_local_alloc_find_clear_bits() argument
910 ocfs2_clear_local_alloc(struct ocfs2_dinode *alloc) ocfs2_clear_local_alloc() argument
947 ocfs2_sync_local_to_main(struct ocfs2_super *osb, handle_t *handle, struct ocfs2_dinode *alloc, struct inode *main_bm_inode, struct buffer_head *main_bm_bh) ocfs2_sync_local_to_main() argument
1152 struct ocfs2_dinode *alloc = NULL; ocfs2_local_alloc_new_window() local
1241 struct ocfs2_dinode *alloc; ocfs2_local_alloc_slide_window() local
[all...]
/kernel/linux/linux-5.10/fs/xfs/libxfs/
H A Dxfs_alloc_btree.c130 len = rec->alloc.ar_blockcount; in xfs_allocbt_update_lastrec()
133 if (be32_to_cpu(rec->alloc.ar_blockcount) <= in xfs_allocbt_update_lastrec()
136 len = rec->alloc.ar_blockcount; in xfs_allocbt_update_lastrec()
186 key->alloc.ar_startblock = rec->alloc.ar_startblock; in xfs_allocbt_init_key_from_rec()
187 key->alloc.ar_blockcount = rec->alloc.ar_blockcount; in xfs_allocbt_init_key_from_rec()
197 x = be32_to_cpu(rec->alloc.ar_startblock); in xfs_bnobt_init_high_key_from_rec()
198 x += be32_to_cpu(rec->alloc.ar_blockcount) - 1; in xfs_bnobt_init_high_key_from_rec()
199 key->alloc in xfs_bnobt_init_high_key_from_rec()
[all...]
/kernel/linux/linux-6.6/fs/xfs/libxfs/
H A Dxfs_alloc_btree.c129 len = rec->alloc.ar_blockcount; in xfs_allocbt_update_lastrec()
132 if (be32_to_cpu(rec->alloc.ar_blockcount) <= in xfs_allocbt_update_lastrec()
135 len = rec->alloc.ar_blockcount; in xfs_allocbt_update_lastrec()
185 key->alloc.ar_startblock = rec->alloc.ar_startblock; in xfs_allocbt_init_key_from_rec()
186 key->alloc.ar_blockcount = rec->alloc.ar_blockcount; in xfs_allocbt_init_key_from_rec()
196 x = be32_to_cpu(rec->alloc.ar_startblock); in xfs_bnobt_init_high_key_from_rec()
197 x += be32_to_cpu(rec->alloc.ar_blockcount) - 1; in xfs_bnobt_init_high_key_from_rec()
198 key->alloc in xfs_bnobt_init_high_key_from_rec()
[all...]
/kernel/linux/linux-6.6/rust/alloc/
H A Draw_vec.rs5 use core::alloc::LayoutError;
13 use crate::alloc::handle_alloc_error;
14 use crate::alloc::{Allocator, Global, Layout};
56 alloc: A,
122 pub const fn new_in(alloc: A) -> Self {
124 Self { ptr: Unique::dangling(), cap: 0, alloc }
131 pub fn with_capacity_in(capacity: usize, alloc: A) -> Self { in with_capacity_in()
132 Self::allocate_in(capacity, AllocInit::Uninitialized, alloc) in with_capacity_in()
138 pub fn try_with_capacity_in(capacity: usize, alloc: A) -> Result<Self, TryReserveError> { in try_with_capacity_in()
139 Self::try_allocate_in(capacity, AllocInit::Uninitialized, alloc) in try_with_capacity_in()
[all...]
H A Dslice.rs27 use crate::alloc::Allocator;
29 use crate::alloc::{self, Global};
94 use core::alloc::Allocator;
105 let (b, alloc) = Box::into_raw_with_allocator(b); in into_vec()
106 Vec::from_raw_parts_in(b as *mut T, len, len, alloc) in into_vec()
112 pub fn to_vec<T: ConvertVec, A: Allocator>(s: &[T], alloc: A) -> Vec<T, A> { in to_vec()
113 T::to_vec(s, alloc) in to_vec()
118 fn to_vec<A: Allocator>(s: &[Self], alloc: A) -> Vec<Self, A> in to_vec()
126 default fn to_vec<A: Allocator>(s: &[Self], alloc: A) -> Vec<Self, A> {
141 let mut vec = Vec::with_capacity_in(s.len(), alloc);
[all...]
/kernel/linux/linux-5.10/tools/perf/util/
H A Dstrbuf.c22 sb->alloc = sb->len = 0; in strbuf_init()
31 if (sb->alloc) { in strbuf_release()
39 char *res = sb->alloc ? sb->buf : NULL; in strbuf_detach()
51 if (nr < sb->alloc) in strbuf_grow()
57 if (alloc_nr(sb->alloc) > nr) in strbuf_grow()
58 nr = alloc_nr(sb->alloc); in strbuf_grow()
61 * Note that sb->buf == strbuf_slopbuf if sb->alloc == 0, and it is in strbuf_grow()
64 buf = realloc(sb->alloc ? sb->buf : NULL, nr * sizeof(*buf)); in strbuf_grow()
69 sb->alloc = nr; in strbuf_grow()
106 len = vsnprintf(sb->buf + sb->len, sb->alloc in strbuf_addv()
[all...]
/kernel/linux/linux-6.6/tools/perf/util/
H A Dstrbuf.c22 sb->alloc = sb->len = 0; in strbuf_init()
31 if (sb->alloc) { in strbuf_release()
39 char *res = sb->alloc ? sb->buf : NULL; in strbuf_detach()
51 if (nr < sb->alloc) in strbuf_grow()
57 if (alloc_nr(sb->alloc) > nr) in strbuf_grow()
58 nr = alloc_nr(sb->alloc); in strbuf_grow()
61 * Note that sb->buf == strbuf_slopbuf if sb->alloc == 0, and it is in strbuf_grow()
64 buf = realloc(sb->alloc ? sb->buf : NULL, nr * sizeof(*buf)); in strbuf_grow()
69 sb->alloc = nr; in strbuf_grow()
106 len = vsnprintf(sb->buf + sb->len, sb->alloc in strbuf_addv()
[all...]
/kernel/linux/linux-6.6/lib/zstd/compress/
H A Dzstd_cwksp.h201 * Returns an adjusted alloc size that is the nearest larger multiple of 64 bytes.
247 void* const alloc = (BYTE*)ws->allocStart - bytes; in ZSTD_cwksp_reserve_internal_buffer_space() local
250 alloc, bytes, ZSTD_cwksp_available_space(ws) - bytes); in ZSTD_cwksp_reserve_internal_buffer_space()
252 assert(alloc >= bottom); in ZSTD_cwksp_reserve_internal_buffer_space()
253 if (alloc < bottom) { in ZSTD_cwksp_reserve_internal_buffer_space()
254 DEBUGLOG(4, "cwksp: alloc failed!"); in ZSTD_cwksp_reserve_internal_buffer_space()
260 if (alloc < ws->tableValidEnd) { in ZSTD_cwksp_reserve_internal_buffer_space()
261 ws->tableValidEnd = alloc; in ZSTD_cwksp_reserve_internal_buffer_space()
263 ws->allocStart = alloc; in ZSTD_cwksp_reserve_internal_buffer_space()
264 return alloc; in ZSTD_cwksp_reserve_internal_buffer_space()
295 void* const alloc = ws->objectEnd; ZSTD_cwksp_internal_advance_phase() local
326 void* alloc; ZSTD_cwksp_reserve_internal() local
365 void* alloc; ZSTD_cwksp_reserve_table() local
401 void* alloc = ws->objectEnd; ZSTD_cwksp_reserve_object() local
[all...]
/kernel/linux/linux-5.10/tools/lib/subcmd/
H A Dsubcmd-util.h35 * is 'alloc', using the standard growing factor alloc_nr() macro.
37 * DO NOT USE any expression with side-effect for 'x' or 'alloc'.
39 #define ALLOC_GROW(x, nr, alloc) \
41 if ((nr) > alloc) { \
42 if (alloc_nr(alloc) < (nr)) \
43 alloc = (nr); \
45 alloc = alloc_nr(alloc); \
46 x = xrealloc((x), alloc * sizeof(*(x))); \
/kernel/linux/linux-6.6/tools/lib/subcmd/
H A Dsubcmd-util.h34 * is 'alloc', using the standard growing factor alloc_nr() macro.
36 * DO NOT USE any expression with side-effect for 'x' or 'alloc'.
38 #define ALLOC_GROW(x, nr, alloc) \
40 if ((nr) > alloc) { \
41 if (alloc_nr(alloc) < (nr)) \
42 alloc = (nr); \
44 alloc = alloc_nr(alloc); \
45 x = xrealloc((x), alloc * sizeof(*(x))); \

Completed in 13 milliseconds

12345678910>>...37