Home
last modified time | relevance | path

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

12345678910>>...230

/openbmc/qemu/util/
H A Dbuffer.c23 #include "qemu/buffer.h"
34 static size_t buffer_req_size(Buffer *buffer, size_t len) in buffer_req_size() argument
37 pow2ceil(buffer->offset + len)); in buffer_req_size()
40 static void buffer_adj_size(Buffer *buffer, size_t len) in buffer_adj_size() argument
42 size_t old = buffer->capacity; in buffer_adj_size()
43 buffer->capacity = buffer_req_size(buffer, len); in buffer_adj_size()
44 buffer->buffer = g_realloc(buffer->buffer, buffer->capacity); in buffer_adj_size()
45 trace_buffer_resize(buffer->name ?: "unnamed", in buffer_adj_size()
46 old, buffer->capacity); in buffer_adj_size()
48 /* make it even harder for the buffer to shrink, reset average size in buffer_adj_size()
[all …]
/openbmc/linux/tools/testing/selftests/mm/
H A 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 …]
/openbmc/qemu/include/qemu/
H A Dbuffer.h25 typedef struct Buffer Buffer; typedef
28 * Buffer:
30 * The Buffer object provides a simple dynamically resizing
35 struct Buffer { struct
40 uint8_t *buffer; member
45 * @buffer: the buffer object
46 * @name: buffer name
48 * Optionally attach a name to the buffer, to make it easier
51 void buffer_init(Buffer *buffer, const char *name, ...) argument
56 * @buffer: the buffer object
[all …]
/openbmc/linux/drivers/gpu/drm/etnaviv/
H A 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 …]
/openbmc/linux/drivers/s390/char/
H A 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 …]
/openbmc/linux/fs/configfs/
H A 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 …]
/openbmc/linux/drivers/android/
H A 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 …]
/openbmc/linux/sound/pci/hda/
H A 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 …]
/openbmc/linux/include/linux/
H A 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 …]
/openbmc/linux/drivers/iio/
H A 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 …]
/openbmc/linux/drivers/dma-buf/heaps/
H A 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 …]
H A Dsystem_heap.c85 struct system_heap_buffer *buffer = dmabuf->priv; in system_heap_attach() local
93 table = dup_sg_table(&buffer->sg_table); in system_heap_attach()
106 mutex_lock(&buffer->lock); in system_heap_attach()
107 list_add(&a->list, &buffer->attachments); in system_heap_attach()
108 mutex_unlock(&buffer->lock); in system_heap_attach()
116 struct system_heap_buffer *buffer = dmabuf->priv; in system_heap_detach() local
119 mutex_lock(&buffer->lock); in system_heap_detach()
121 mutex_unlock(&buffer->lock); in system_heap_detach()
156 struct system_heap_buffer *buffer = dmabuf->priv; in system_heap_dma_buf_begin_cpu_access() local
159 mutex_lock(&buffer->lock); in system_heap_dma_buf_begin_cpu_access()
[all …]
/openbmc/linux/sound/pci/ca0106/
H A 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 …]
/openbmc/linux/include/linux/iio/
H A 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 …]
/openbmc/linux/drivers/pnp/
H A 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 …]
/openbmc/google-misc/subprojects/ncsid/src/platforms/nemora/portable/
H A Dncsi_server.h37 * Build the header for the response to the command in the buffer.
40 * request_buf: buffer containing NC-SI request.
41 * response_buf: buffer, where to put the response. Must be big enough to fit
52 * Construct simple ACK command in the buffer, given the buffer with the
56 * request_buf: buffer containing NC-SI request.
57 * response_buf: buffer, where to put the response. Must be big enough to fit
60 * Returns the size of the response in the buffer.
66 * Construct simple NACK command in the buffer, given the buffer with the
70 * request_buf: buffer containing NC-SI request.
71 * response_buf: buffer, where to put the response. Must be big enough to fit
[all …]
/openbmc/linux/drivers/net/ethernet/mellanox/mlx5/core/en/
H A Dport_buffer.c41 void *buffer; in mlx5e_port_query_buffer() local
55 buffer = MLX5_ADDR_OF(pbmc_reg, out, buffer[i]); in mlx5e_port_query_buffer()
56 port_buffer->buffer[i].lossy = in mlx5e_port_query_buffer()
57 MLX5_GET(bufferx_reg, buffer, lossy); in mlx5e_port_query_buffer()
58 port_buffer->buffer[i].epsb = in mlx5e_port_query_buffer()
59 MLX5_GET(bufferx_reg, buffer, epsb); in mlx5e_port_query_buffer()
60 port_buffer->buffer[i].size = in mlx5e_port_query_buffer()
61 MLX5_GET(bufferx_reg, buffer, size) * port_buff_cell_sz; in mlx5e_port_query_buffer()
62 port_buffer->buffer[i].xon = in mlx5e_port_query_buffer()
63 MLX5_GET(bufferx_reg, buffer, xon_threshold) * port_buff_cell_sz; in mlx5e_port_query_buffer()
[all …]
/openbmc/linux/sound/usb/6fire/
H A Dcomm.c22 u8 *buffer, void *context, void(*handler)(struct urb *urb)) in usb6fire_comm_init_urb() argument
25 urb->transfer_buffer = buffer; in usb6fire_comm_init_urb()
55 static void usb6fire_comm_init_buffer(u8 *buffer, u8 id, u8 request, in usb6fire_comm_init_buffer() argument
58 buffer[0] = 0x01; in usb6fire_comm_init_buffer()
59 buffer[2] = request; in usb6fire_comm_init_buffer()
60 buffer[3] = id; in usb6fire_comm_init_buffer()
63 buffer[1] = 0x05; /* length (starting at buffer[2]) */ in usb6fire_comm_init_buffer()
64 buffer[4] = reg; in usb6fire_comm_init_buffer()
65 buffer[5] = vl; in usb6fire_comm_init_buffer()
66 buffer[6] = vh; in usb6fire_comm_init_buffer()
[all …]
/openbmc/linux/drivers/iio/buffer/
H A Dindustrialio-buffer-dmaengine.c17 #include <linux/iio/buffer.h>
19 #include <linux/iio/buffer-dma.h>
20 #include <linux/iio/buffer-dmaengine.h>
23 * The IIO DMAengine buffer combines the generic IIO DMA buffer infrastructure
24 * with the DMAengine framework. The generic IIO DMA buffer infrastructure is
25 * used to manage the buffer memory and implement the IIO buffer operations
27 * this results in a device independent fully functional DMA buffer
43 struct iio_buffer *buffer) in iio_buffer_to_dmaengine_buffer() argument
45 return container_of(buffer, struct dmaengine_buffer, queue.buffer); in iio_buffer_to_dmaengine_buffer()
65 iio_buffer_to_dmaengine_buffer(&queue->buffer); in iio_dmaengine_buffer_submit_block()
[all …]
/openbmc/linux/drivers/gpu/drm/
H A Ddrm_client.c32 * GEM drivers which provide a GEM based dumb buffer with a virtual address are supported.
165 * is fbdev which cannot free the buffer if userspace has open file descriptors.
265 static void drm_client_buffer_delete(struct drm_client_buffer *buffer) in drm_client_buffer_delete() argument
267 if (buffer->gem) { in drm_client_buffer_delete()
268 drm_gem_vunmap_unlocked(buffer->gem, &buffer->map); in drm_client_buffer_delete()
269 drm_gem_object_put(buffer->gem); in drm_client_buffer_delete()
272 kfree(buffer); in drm_client_buffer_delete()
282 struct drm_client_buffer *buffer; in drm_client_buffer_create() local
286 buffer = kzalloc(sizeof(*buffer), GFP_KERNEL); in drm_client_buffer_create()
287 if (!buffer) in drm_client_buffer_create()
[all …]
/openbmc/linux/tools/wmi/
H A Ddell-smbios-example.c32 static void show_buffer(struct dell_wmi_smbios_buffer *buffer) in show_buffer() argument
35 buffer->std.cmd_class, buffer->std.cmd_select, in show_buffer()
36 buffer->std.input[0], buffer->std.input[1], in show_buffer()
37 buffer->std.input[2], buffer->std.input[3], in show_buffer()
38 buffer->std.output[0], buffer->std.output[1], in show_buffer()
39 buffer->std.output[2], buffer->std.output[3]); in show_buffer()
42 static int run_wmi_smbios_cmd(struct dell_wmi_smbios_buffer *buffer) in run_wmi_smbios_cmd() argument
48 ret = ioctl(fd, DELL_WMI_SMBIOS_CMD, buffer); in run_wmi_smbios_cmd()
95 struct dell_wmi_smbios_buffer *buffer) in token_is_active() argument
99 buffer->std.cmd_class = CLASS_TOKEN_READ; in token_is_active()
[all …]
/openbmc/linux/drivers/acpi/acpica/
H A Dexstorob.c26 * DESCRIPTION: Copy a buffer object to another buffer object.
34 u8 *buffer; in acpi_ex_store_buffer_to_buffer() local
44 /* We know that source_desc is a buffer by now */ in acpi_ex_store_buffer_to_buffer()
46 buffer = ACPI_CAST_PTR(u8, source_desc->buffer.pointer); in acpi_ex_store_buffer_to_buffer()
47 length = source_desc->buffer.length; in acpi_ex_store_buffer_to_buffer()
50 * If target is a buffer of length zero or is a static buffer, in acpi_ex_store_buffer_to_buffer()
51 * allocate a new buffer of the proper length in acpi_ex_store_buffer_to_buffer()
53 if ((target_desc->buffer.length == 0) || in acpi_ex_store_buffer_to_buffer()
55 target_desc->buffer.pointer = ACPI_ALLOCATE(length); in acpi_ex_store_buffer_to_buffer()
56 if (!target_desc->buffer.pointer) { in acpi_ex_store_buffer_to_buffer()
[all …]
/openbmc/linux/sound/usb/
H A Dproc.c33 static void proc_audio_usbbus_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) in proc_audio_usbbus_read() argument
37 snd_iprintf(buffer, "%03d/%03d\n", chip->dev->bus->busnum, chip->dev->devnum); in proc_audio_usbbus_read()
40 static void proc_audio_usbid_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) in proc_audio_usbid_read() argument
44 snd_iprintf(buffer, "%04x:%04x\n", in proc_audio_usbid_read()
92 …ic void proc_dump_substream_formats(struct snd_usb_substream *subs, struct snd_info_buffer *buffer) in proc_dump_substream_formats() argument
102 snd_iprintf(buffer, " Interface %d\n", fp->iface); in proc_dump_substream_formats()
103 snd_iprintf(buffer, " Altset %d\n", fp->altsetting); in proc_dump_substream_formats()
104 snd_iprintf(buffer, " Format:"); in proc_dump_substream_formats()
107 snd_iprintf(buffer, " %s", in proc_dump_substream_formats()
109 snd_iprintf(buffer, "\n"); in proc_dump_substream_formats()
[all …]
/openbmc/linux/sound/firewire/dice/
H A Ddice-proc.c11 static int dice_proc_read_mem(struct snd_dice *dice, void *buffer, in dice_proc_read_mem() argument
19 buffer, 4 * quadlets, 0); in dice_proc_read_mem()
24 be32_to_cpus(&((u32 *)buffer)[i]); in dice_proc_read_mem()
57 struct snd_info_buffer *buffer) in dice_proc_read() argument
119 snd_iprintf(buffer, "sections:\n"); in dice_proc_read()
121 snd_iprintf(buffer, " %s: offset %u, size %u\n", in dice_proc_read()
128 snd_iprintf(buffer, "global:\n"); in dice_proc_read()
129 snd_iprintf(buffer, " owner: %04x:%04x%08x\n", in dice_proc_read()
132 snd_iprintf(buffer, " notification: %08x\n", buf.global.notification); in dice_proc_read()
134 snd_iprintf(buffer, " nick name: %s\n", buf.global.nick_name); in dice_proc_read()
[all …]
/openbmc/u-boot/include/
H A Dbouncebuf.h3 * Generic bounce buffer implementation
14 * GEN_BB_READ -- Data are read from the buffer eg. by DMA hardware.
15 * The source buffer is copied into the bounce buffer (if unaligned, otherwise
16 * the source buffer is used directly) upon start() call, then the operation
17 * requiring the aligned transfer happens, then the bounce buffer is lost upon
22 * GEN_BB_WRITE -- Data are written into the buffer eg. by DMA hardware.
23 * The source buffer starts in an undefined state upon start() call, then the
24 * operation requiring the aligned transfer happens, then the bounce buffer is
25 * copied into the destination buffer (if unaligned, otherwise destination
26 * buffer is used directly) upon stop() call.
[all …]

12345678910>>...230