Home
last modified time | relevance | path

Searched full:buffer (Results 1 – 25 of 10792) sorted by relevance

12345678910>>...432

/kernel/linux/linux-6.6/tools/testing/selftests/mm/
Dhmm-tests.c180 struct hmm_buffer *buffer, in hmm_dmirror_cmd() argument
187 cmd.addr = (__u64)buffer->ptr; in hmm_dmirror_cmd()
188 cmd.ptr = (__u64)buffer->mirror; in hmm_dmirror_cmd()
199 buffer->cpages = cmd.cpages; in hmm_dmirror_cmd()
200 buffer->faults = cmd.faults; in hmm_dmirror_cmd()
205 static void hmm_buffer_free(struct hmm_buffer *buffer) in hmm_buffer_free() argument
207 if (buffer == NULL) in hmm_buffer_free()
210 if (buffer->ptr) in hmm_buffer_free()
211 munmap(buffer->ptr, buffer->size); in hmm_buffer_free()
212 free(buffer->mirror); in hmm_buffer_free()
[all …]
/kernel/linux/linux-5.10/tools/testing/selftests/vm/
Dhmm-tests.c122 struct hmm_buffer *buffer, in hmm_dmirror_cmd() argument
129 cmd.addr = (__u64)buffer->ptr; in hmm_dmirror_cmd()
130 cmd.ptr = (__u64)buffer->mirror; in hmm_dmirror_cmd()
141 buffer->cpages = cmd.cpages; in hmm_dmirror_cmd()
142 buffer->faults = cmd.faults; in hmm_dmirror_cmd()
147 static void hmm_buffer_free(struct hmm_buffer *buffer) in hmm_buffer_free() argument
149 if (buffer == NULL) in hmm_buffer_free()
152 if (buffer->ptr) in hmm_buffer_free()
153 munmap(buffer->ptr, buffer->size); in hmm_buffer_free()
154 free(buffer->mirror); in hmm_buffer_free()
[all …]
/kernel/linux/linux-6.6/drivers/gpu/drm/etnaviv/
Detnaviv_buffer.c21 * Command Buffer helper:
25 static inline void OUT(struct etnaviv_cmdbuf *buffer, u32 data) in OUT() argument
27 u32 *vaddr = (u32 *)buffer->vaddr; in OUT()
29 BUG_ON(buffer->user_size >= buffer->size); in OUT()
31 vaddr[buffer->user_size / 4] = data; in OUT()
32 buffer->user_size += 4; in OUT()
35 static inline void CMD_LOAD_STATE(struct etnaviv_cmdbuf *buffer, in CMD_LOAD_STATE() argument
40 buffer->user_size = ALIGN(buffer->user_size, 8); in CMD_LOAD_STATE()
43 OUT(buffer, VIV_FE_LOAD_STATE_HEADER_OP_LOAD_STATE | in CMD_LOAD_STATE()
46 OUT(buffer, value); in CMD_LOAD_STATE()
[all …]
/kernel/linux/linux-5.10/drivers/gpu/drm/etnaviv/
Detnaviv_buffer.c21 * Command Buffer helper:
25 static inline void OUT(struct etnaviv_cmdbuf *buffer, u32 data) in OUT() argument
27 u32 *vaddr = (u32 *)buffer->vaddr; in OUT()
29 BUG_ON(buffer->user_size >= buffer->size); in OUT()
31 vaddr[buffer->user_size / 4] = data; in OUT()
32 buffer->user_size += 4; in OUT()
35 static inline void CMD_LOAD_STATE(struct etnaviv_cmdbuf *buffer, in CMD_LOAD_STATE() argument
40 buffer->user_size = ALIGN(buffer->user_size, 8); in CMD_LOAD_STATE()
43 OUT(buffer, VIV_FE_LOAD_STATE_HEADER_OP_LOAD_STATE | in CMD_LOAD_STATE()
46 OUT(buffer, value); in CMD_LOAD_STATE()
[all …]
/kernel/linux/linux-6.6/drivers/s390/char/
Dsclp_rw.c35 * Setup a sclp write buffer. Gets a page as input (4K) and returns
37 * end of the input page. This reduces the buffer space by a few
43 struct sclp_buffer *buffer; in sclp_make_buffer() local
51 buffer = ((struct sclp_buffer *) ((addr_t) sccb + PAGE_SIZE)) - 1; in sclp_make_buffer()
52 buffer->sccb = sccb; in sclp_make_buffer()
53 buffer->retry_count = 0; in sclp_make_buffer()
54 buffer->messages = 0; in sclp_make_buffer()
55 buffer->char_sum = 0; in sclp_make_buffer()
56 buffer->current_line = NULL; in sclp_make_buffer()
57 buffer->current_length = 0; in sclp_make_buffer()
[all …]
/kernel/linux/linux-5.10/drivers/dma-buf/heaps/
Dheap-helpers.c15 void init_heap_helper_buffer(struct heap_helper_buffer *buffer, in init_heap_helper_buffer() argument
18 buffer->priv_virt = NULL; in init_heap_helper_buffer()
19 mutex_init(&buffer->lock); in init_heap_helper_buffer()
20 buffer->vmap_cnt = 0; in init_heap_helper_buffer()
21 buffer->vaddr = NULL; in init_heap_helper_buffer()
22 buffer->pagecount = 0; in init_heap_helper_buffer()
23 buffer->pages = NULL; in init_heap_helper_buffer()
24 INIT_LIST_HEAD(&buffer->attachments); in init_heap_helper_buffer()
25 buffer->free = free; in init_heap_helper_buffer()
28 struct dma_buf *heap_helper_export_dmabuf(struct heap_helper_buffer *buffer, in heap_helper_export_dmabuf() argument
[all …]
/kernel/linux/linux-5.10/fs/configfs/
Dfile.c58 static int fill_read_buffer(struct file *file, struct configfs_buffer *buffer) in fill_read_buffer() argument
63 if (!buffer->page) in fill_read_buffer()
64 buffer->page = (char *) get_zeroed_page(GFP_KERNEL); in fill_read_buffer()
65 if (!buffer->page) in fill_read_buffer()
70 count = buffer->attr->show(buffer->item, buffer->page); in fill_read_buffer()
77 buffer->needs_read_fill = 0; in fill_read_buffer()
78 buffer->count = count; in fill_read_buffer()
85 * @buf: buffer to fill.
93 * We call fill_read_buffer() to allocate and fill the buffer from the
95 * the beginning of the file). That should fill the entire buffer with
[all …]
/kernel/linux/linux-5.10/drivers/s390/char/
Dsclp_rw.c42 * Setup a sclp write buffer. Gets a page as input (4K) and returns
44 * end of the input page. This reduces the buffer space by a few
50 struct sclp_buffer *buffer; in sclp_make_buffer() local
58 buffer = ((struct sclp_buffer *) ((addr_t) sccb + PAGE_SIZE)) - 1; in sclp_make_buffer()
59 buffer->sccb = sccb; in sclp_make_buffer()
60 buffer->retry_count = 0; in sclp_make_buffer()
61 buffer->messages = 0; in sclp_make_buffer()
62 buffer->char_sum = 0; in sclp_make_buffer()
63 buffer->current_line = NULL; in sclp_make_buffer()
64 buffer->current_length = 0; in sclp_make_buffer()
[all …]
/kernel/linux/linux-6.6/fs/configfs/
Dfile.c56 static int fill_read_buffer(struct file *file, struct configfs_buffer *buffer) in fill_read_buffer() argument
61 if (!buffer->page) in fill_read_buffer()
62 buffer->page = (char *) get_zeroed_page(GFP_KERNEL); in fill_read_buffer()
63 if (!buffer->page) in fill_read_buffer()
68 count = buffer->attr->show(buffer->item, buffer->page); in fill_read_buffer()
75 buffer->needs_read_fill = 0; in fill_read_buffer()
76 buffer->count = count; in fill_read_buffer()
83 struct configfs_buffer *buffer = file->private_data; in configfs_read_iter() local
86 mutex_lock(&buffer->mutex); in configfs_read_iter()
87 if (buffer->needs_read_fill) { in configfs_read_iter()
[all …]
/kernel/linux/linux-6.6/drivers/android/
Dbinder_alloc.c50 static struct binder_buffer *binder_buffer_next(struct binder_buffer *buffer) in binder_buffer_next() argument
52 return list_entry(buffer->entry.next, struct binder_buffer, entry); in binder_buffer_next()
55 static struct binder_buffer *binder_buffer_prev(struct binder_buffer *buffer) in binder_buffer_prev() argument
57 return list_entry(buffer->entry.prev, struct binder_buffer, entry); in binder_buffer_prev()
61 struct binder_buffer *buffer) 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()
65 return binder_buffer_next(buffer)->user_data - buffer->user_data; in binder_alloc_buffer_size()
73 struct binder_buffer *buffer; in binder_insert_free_buffer() local
82 "%d: add free buffer, size %zd, at %pK\n", in binder_insert_free_buffer()
[all …]
/kernel/linux/linux-6.6/sound/pci/hda/
Dhda_proc.c47 static void print_nid_array(struct snd_info_buffer *buffer, in print_nid_array() argument
58 snd_iprintf(buffer, in print_nid_array()
63 snd_iprintf(buffer, in print_nid_array()
74 static void print_nid_pcms(struct snd_info_buffer *buffer, in print_nid_pcms() argument
84 snd_iprintf(buffer, " Device: name=\"%s\", " in print_nid_pcms()
93 static void print_amp_caps(struct snd_info_buffer *buffer, in print_amp_caps() argument
100 snd_iprintf(buffer, "N/A\n"); in print_amp_caps()
103 snd_iprintf(buffer, "ofs=0x%02x, nsteps=0x%02x, stepsize=0x%02x, " in print_amp_caps()
133 static void print_amp_vals(struct snd_info_buffer *buffer, in print_amp_vals() argument
145 snd_iprintf(buffer, " ["); in print_amp_vals()
[all …]
/kernel/linux/linux-5.10/drivers/iio/
Dindustrialio-buffer.c6 * Handling of buffer allocation / resizing.
26 #include <linux/iio/buffer.h>
63 /* drain the buffer if it was disabled */ in iio_buffer_ready()
92 * iio_buffer_read_outer() - chrdev read for buffer access
94 * @buf: Destination buffer for iio buffer read
98 * This function relies on all buffer implementations having an
108 struct iio_buffer *rb = indio_dev->buffer; in iio_buffer_read_outer()
124 * buffer, so signal end of file now. in iio_buffer_read_outer()
162 * iio_buffer_poll() - poll the buffer to find out if it has data
174 struct iio_buffer *rb = indio_dev->buffer; in iio_buffer_poll()
[all …]
/kernel/linux/linux-5.10/drivers/android/
Dbinder_alloc.c50 static struct binder_buffer *binder_buffer_next(struct binder_buffer *buffer) in binder_buffer_next() argument
52 return list_entry(buffer->entry.next, struct binder_buffer, entry); in binder_buffer_next()
55 static struct binder_buffer *binder_buffer_prev(struct binder_buffer *buffer) in binder_buffer_prev() argument
57 return list_entry(buffer->entry.prev, struct binder_buffer, entry); in binder_buffer_prev()
61 struct binder_buffer *buffer) 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()
65 return binder_buffer_next(buffer)->user_data - buffer->user_data; in binder_alloc_buffer_size()
73 struct binder_buffer *buffer; in binder_insert_free_buffer() local
82 "%d: add free buffer, size %zd, at %pK\n", in binder_insert_free_buffer()
[all …]
/kernel/linux/linux-5.10/sound/pci/hda/
Dhda_proc.c47 static void print_nid_array(struct snd_info_buffer *buffer, in print_nid_array() argument
58 snd_iprintf(buffer, in print_nid_array()
63 snd_iprintf(buffer, in print_nid_array()
74 static void print_nid_pcms(struct snd_info_buffer *buffer, in print_nid_pcms() argument
84 snd_iprintf(buffer, " Device: name=\"%s\", " in print_nid_pcms()
93 static void print_amp_caps(struct snd_info_buffer *buffer, in print_amp_caps() argument
100 snd_iprintf(buffer, "N/A\n"); in print_amp_caps()
103 snd_iprintf(buffer, "ofs=0x%02x, nsteps=0x%02x, stepsize=0x%02x, " in print_amp_caps()
133 static void print_amp_vals(struct snd_info_buffer *buffer, in print_amp_vals() argument
145 snd_iprintf(buffer, " ["); in print_amp_vals()
[all …]
/kernel/linux/linux-6.6/drivers/iio/
Dindustrialio-buffer.c6 * Handling of buffer allocation / resizing.
28 #include <linux/iio/buffer.h>
65 /* drain the buffer if it was disabled */ in iio_buffer_ready()
94 * iio_buffer_read() - chrdev read for buffer access
96 * @buf: Destination buffer for iio buffer read
100 * This function relies on all buffer implementations having an
110 struct iio_buffer *rb = ib->buffer; in iio_buffer_read()
130 * buffer, so signal end of file now. in iio_buffer_read()
179 struct iio_buffer *rb = ib->buffer; in iio_buffer_write()
230 * iio_buffer_poll() - poll the buffer to find out if it has data
[all …]
/kernel/linux/linux-6.6/include/linux/
Dring_buffer.h22 * enum ring_buffer_type - internal ring buffer types
64 u64 ring_buffer_event_time_stamp(struct trace_buffer *buffer,
71 * will try to remove the event from the ring buffer completely
77 * ring_buffer_discard_commit(buffer, event);
79 * ring_buffer_unlock_commit(buffer, event);
81 void ring_buffer_discard_commit(struct trace_buffer *buffer,
85 * size is in bytes for each per CPU buffer.
91 * Because the ring buffer is generic, if other users of the ring buffer get
93 * ring buffer's lock class separate.
102 int ring_buffer_wait(struct trace_buffer *buffer, int cpu, int full);
[all …]
/kernel/linux/linux-6.6/drivers/dma-buf/heaps/
Dcma_heap.c53 struct cma_heap_buffer *buffer = dmabuf->priv; in cma_heap_attach() local
61 ret = sg_alloc_table_from_pages(&a->table, buffer->pages, in cma_heap_attach()
62 buffer->pagecount, 0, in cma_heap_attach()
63 buffer->pagecount << PAGE_SHIFT, in cma_heap_attach()
76 mutex_lock(&buffer->lock); in cma_heap_attach()
77 list_add(&a->list, &buffer->attachments); in cma_heap_attach()
78 mutex_unlock(&buffer->lock); in cma_heap_attach()
86 struct cma_heap_buffer *buffer = dmabuf->priv; in cma_heap_detach() local
89 mutex_lock(&buffer->lock); in cma_heap_detach()
91 mutex_unlock(&buffer->lock); in cma_heap_detach()
[all …]
/kernel/linux/linux-5.10/include/linux/
Dring_buffer.h22 * enum ring_buffer_type - internal ring buffer types
70 * will try to remove the event from the ring buffer completely
76 * ring_buffer_discard_commit(buffer, event);
78 * ring_buffer_unlock_commit(buffer, event);
80 void ring_buffer_discard_commit(struct trace_buffer *buffer,
84 * size is in bytes for each per CPU buffer.
90 * Because the ring buffer is generic, if other users of the ring buffer get
92 * ring buffer's lock class separate.
100 int ring_buffer_wait(struct trace_buffer *buffer, int cpu, int full);
101 __poll_t ring_buffer_poll_wait(struct trace_buffer *buffer, int cpu,
[all …]
/kernel/linux/linux-6.6/sound/pci/ca0106/
Dca0106_proc.c15 * Use separate card based DMA buffer for periods table list.
84 static void snd_ca0106_proc_dump_iec958( struct snd_info_buffer *buffer, u32 value) in snd_ca0106_proc_dump_iec958() argument
95 snd_iprintf(buffer, "Mode: consumer\n"); in snd_ca0106_proc_dump_iec958()
96 snd_iprintf(buffer, "Data: "); in snd_ca0106_proc_dump_iec958()
98 snd_iprintf(buffer, "audio\n"); in snd_ca0106_proc_dump_iec958()
100 snd_iprintf(buffer, "non-audio\n"); in snd_ca0106_proc_dump_iec958()
102 snd_iprintf(buffer, "Rate: "); in snd_ca0106_proc_dump_iec958()
105 snd_iprintf(buffer, "44100 Hz\n"); in snd_ca0106_proc_dump_iec958()
108 snd_iprintf(buffer, "48000 Hz\n"); in snd_ca0106_proc_dump_iec958()
111 snd_iprintf(buffer, "32000 Hz\n"); in snd_ca0106_proc_dump_iec958()
[all …]
/kernel/linux/linux-5.10/sound/pci/ca0106/
Dca0106_proc.c15 * Use separate card based DMA buffer for periods table list.
84 static void snd_ca0106_proc_dump_iec958( struct snd_info_buffer *buffer, u32 value) in snd_ca0106_proc_dump_iec958() argument
95 snd_iprintf(buffer, "Mode: consumer\n"); in snd_ca0106_proc_dump_iec958()
96 snd_iprintf(buffer, "Data: "); in snd_ca0106_proc_dump_iec958()
98 snd_iprintf(buffer, "audio\n"); in snd_ca0106_proc_dump_iec958()
100 snd_iprintf(buffer, "non-audio\n"); in snd_ca0106_proc_dump_iec958()
102 snd_iprintf(buffer, "Rate: "); in snd_ca0106_proc_dump_iec958()
105 snd_iprintf(buffer, "44100 Hz\n"); in snd_ca0106_proc_dump_iec958()
108 snd_iprintf(buffer, "48000 Hz\n"); in snd_ca0106_proc_dump_iec958()
111 snd_iprintf(buffer, "32000 Hz\n"); in snd_ca0106_proc_dump_iec958()
[all …]
/kernel/linux/linux-6.6/include/linux/iio/
Dbuffer_impl.h9 #include <uapi/linux/iio/buffer.h>
10 #include <linux/iio/buffer.h>
16 * INDIO_BUFFER_FLAG_FIXED_WATERMARK - Watermark level of the buffer can not be
17 * configured. It has a fixed value which will be buffer specific.
23 * @store_to: actually store stuff to the buffer
26 * the buffer.
27 * @remove_from: remove scan from buffer. Drivers should calls this to
28 * remove a scan from a buffer.
30 * @space_available: returns the amount of bytes available in a buffer
34 * @set_length: set number of datums in buffer
[all …]
/kernel/linux/linux-5.10/drivers/gpu/drm/
Ddrm_client.c31 * GEM drivers which provide a GEM based dumb buffer with a virtual address are supported.
143 * is fbdev which cannot free the buffer if userspace has open file descriptors.
233 static void drm_client_buffer_delete(struct drm_client_buffer *buffer) in drm_client_buffer_delete() argument
235 struct drm_device *dev = buffer->client->dev; in drm_client_buffer_delete()
237 drm_gem_vunmap(buffer->gem, buffer->vaddr); in drm_client_buffer_delete()
239 if (buffer->gem) in drm_client_buffer_delete()
240 drm_gem_object_put(buffer->gem); in drm_client_buffer_delete()
242 if (buffer->handle) in drm_client_buffer_delete()
243 drm_mode_destroy_dumb(dev, buffer->handle, buffer->client->file); in drm_client_buffer_delete()
245 kfree(buffer); in drm_client_buffer_delete()
[all …]
/kernel/linux/linux-6.6/drivers/pnp/
Dinterface.c26 char *buffer; /* pointer to begin of buffer */ member
27 char *curr; /* current position in buffer */
29 unsigned long len; /* total length of buffer */
37 static int pnp_printf(pnp_info_buffer_t * buffer, char *fmt, ...) in pnp_printf() argument
42 if (buffer->stop || buffer->error) in pnp_printf()
45 res = vsnprintf(buffer->curr, buffer->len - buffer->size, fmt, args); in pnp_printf()
47 if (buffer->size + res >= buffer->len) { in pnp_printf()
48 buffer->stop = 1; in pnp_printf()
51 buffer->curr += res; in pnp_printf()
52 buffer->size += res; in pnp_printf()
[all …]
/kernel/linux/linux-5.10/drivers/staging/android/ion/
Dion.c38 struct ion_buffer *buffer; in ion_buffer_create() local
41 buffer = kzalloc(sizeof(*buffer), GFP_KERNEL); in ion_buffer_create()
42 if (!buffer) in ion_buffer_create()
45 buffer->heap = heap; in ion_buffer_create()
46 buffer->flags = flags; in ion_buffer_create()
47 buffer->dev = dev; in ion_buffer_create()
48 buffer->size = len; in ion_buffer_create()
50 ret = heap->ops->allocate(heap, buffer, len, flags); in ion_buffer_create()
57 ret = heap->ops->allocate(heap, buffer, len, flags); in ion_buffer_create()
62 if (!buffer->sg_table) { in ion_buffer_create()
[all …]
/kernel/linux/linux-5.10/drivers/pnp/
Dinterface.c26 char *buffer; /* pointer to begin of buffer */ member
27 char *curr; /* current position in buffer */
29 unsigned long len; /* total length of buffer */
36 static int pnp_printf(pnp_info_buffer_t * buffer, char *fmt, ...) in pnp_printf() argument
41 if (buffer->stop || buffer->error) in pnp_printf()
44 res = vsnprintf(buffer->curr, buffer->len - buffer->size, fmt, args); in pnp_printf()
46 if (buffer->size + res >= buffer->len) { in pnp_printf()
47 buffer->stop = 1; in pnp_printf()
50 buffer->curr += res; in pnp_printf()
51 buffer->size += res; in pnp_printf()
[all …]

12345678910>>...432