Home
last modified time | relevance | path

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

12345678910>>...202

/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 …]
/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 …]
/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 …]
/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 …]
/linux/include/linux/
H A Dring_buffer.h24 * enum ring_buffer_type - internal ring buffer types
66 u64 ring_buffer_event_time_stamp(struct trace_buffer *buffer,
73 * will try to remove the event from the ring buffer completely
79 * ring_buffer_discard_commit(buffer, event);
81 * ring_buffer_unlock_commit(buffer, event);
83 void ring_buffer_discard_commit(struct trace_buffer *buffer,
87 * size is in bytes for each per CPU buffer.
98 void *ring_buffer_meta_scratch(struct trace_buffer *buffer, unsigned int *size);
101 * Because the ring buffer is generic, if other users of the ring buffer get
103 * ring buffer's lock class separate.
[all …]
H A Drelay.h32 * Per-cpu relay channel buffer
36 void *start; /* start of channel buffer */
37 void *data; /* start of current sub-buffer */
38 size_t offset; /* current offset into sub-buffer */
45 struct kref kref; /* channel buffer refcount */
46 struct page **page_array; /* array of current buffer pages */
47 unsigned int page_count; /* number of current buffer pages */
48 unsigned int finalized; /* buffer has been finalized */
49 size_t *padding; /* padding counts per sub-buffer */
62 size_t subbuf_size; /* sub-buffer size */
[all …]
/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 …]
/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 …]
/linux/include/linux/iio/
H A Dbuffer_impl.h9 #include <uapi/linux/iio/buffer.h>
10 #include <linux/iio/buffer.h>
20 * INDIO_BUFFER_FLAG_FIXED_WATERMARK - Watermark level of the buffer can not be
21 * configured. It has a fixed value which will be buffer specific.
27 * @store_to: actually store stuff to the buffer
30 * the buffer.
31 * @remove_from: remove scan from buffer. Drivers should calls this to
32 * remove a scan from a buffer.
34 * @space_available: returns the amount of bytes available in a buffer
38 * @set_length: set number of datums in buffer
[all …]
/linux/drivers/iio/
H A Dindustrialio-buffer.c6 * Handling of buffer allocation / resizing.
34 #include <linux/iio/buffer.h>
45 struct iio_buffer *buffer; member
99 /* drain the buffer if it was disabled */ in iio_buffer_ready()
128 * iio_buffer_read() - chrdev read for buffer access
130 * @buf: Destination buffer for iio buffer read
134 * This function relies on all buffer implementations having an
144 struct iio_buffer *rb = ib->buffer; in iio_buffer_read()
164 * buffer, so signal end of file now. in iio_buffer_read()
213 struct iio_buffer *rb = ib->buffer; in iio_buffer_write()
[all …]
/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 …]
/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 …]
/linux/drivers/net/ethernet/hisilicon/hibmcge/
H A Dhbg_txrx.c13 #define buffer_to_dma_dir(buffer) (((buffer)->dir == HBG_DIR_RX) ? \ argument
34 static int hbg_dma_map(struct hbg_buffer *buffer) in hbg_dma_map() argument
36 struct hbg_priv *priv = buffer->priv; in hbg_dma_map()
38 buffer->skb_dma = dma_map_single(&priv->pdev->dev, in hbg_dma_map()
39 buffer->skb->data, buffer->skb_len, in hbg_dma_map()
40 buffer_to_dma_dir(buffer)); in hbg_dma_map()
41 if (unlikely(dma_mapping_error(&priv->pdev->dev, buffer->skb_dma))) { in hbg_dma_map()
42 if (buffer->dir == HBG_DIR_RX) in hbg_dma_map()
53 static void hbg_dma_unmap(struct hbg_buffer *buffer) in hbg_dma_unmap() argument
55 struct hbg_priv *priv = buffer->priv; in hbg_dma_unmap()
[all …]
/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 …]
/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 …]
/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 …]
/linux/kernel/trace/
H A Dring_buffer.c3 * Generic ring buffer
39 * The "absolute" timestamp in the buffer is only 59 bits.
67 * The ring buffer header is special. We must manually up keep it.
89 * The ring buffer is made up of a list of pages. A separate list of pages is
90 * allocated for each CPU. A writer may only write to a buffer that is
92 * from any per cpu buffer.
94 * The reader is special. For each per cpu buffer, the reader has its own
96 * page is swapped with another page in the ring buffer.
100 * again (as long as it is out of the ring buffer).
105 * |reader| RING BUFFER
[all …]
/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 …]
/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 …]
/linux/Documentation/core-api/
H A Dcircular-buffers.rst16 buffer don't want to share a lock.
25 (*) What is a circular buffer?
35 What is a circular buffer?
38 First of all, what is a circular buffer? A circular buffer is a buffer of
42 buffer.
45 the buffer.
47 Typically when the tail pointer is equal to the head pointer, the buffer is
48 empty; and the buffer is full when the head pointer is one less than the tail
53 indices should be wrapped to 0 when they reach the end of the buffer, thus
54 allowing an infinite amount of data to flow through the buffer.
[all …]
/linux/drivers/s390/net/
H A Dqeth_core_mpc.h18 #define QETH_IPA_PDU_LEN_TOTAL(buffer) (buffer + 0x0e) argument
19 #define QETH_IPA_PDU_LEN_PDU1(buffer) (buffer + 0x26) argument
20 #define QETH_IPA_PDU_LEN_PDU2(buffer) (buffer + 0x29) argument
21 #define QETH_IPA_PDU_LEN_PDU3(buffer) (buffer + 0x3a) argument
23 #define QETH_IPA_CMD_DEST_ADDR(buffer) (buffer + 0x2c) argument
523 char *buffer; member
877 #define QETH_CM_ENABLE_ISSUER_RM_TOKEN(buffer) (buffer + 0x2c) argument
878 #define QETH_CM_ENABLE_FILTER_TOKEN(buffer) (buffer + 0x53) argument
879 #define QETH_CM_ENABLE_USER_DATA(buffer) (buffer + 0x5b) argument
881 #define QETH_CM_ENABLE_RESP_FILTER_TOKEN(buffer) \ argument
[all …]
/linux/drivers/platform/surface/aggregator/
H A Dssh_parser.h19 * struct sshp_buf - Parser buffer for SSH messages.
20 * @ptr: Pointer to the beginning of the buffer.
21 * @len: Number of bytes used in the buffer.
22 * @cap: Maximum capacity of the buffer.
31 * sshp_buf_init() - Initialize a SSH parser buffer.
32 * @buf: The buffer to initialize.
33 * @ptr: The memory backing the buffer.
34 * @cap: The length of the memory backing the buffer, i.e. its capacity.
36 * Initializes the buffer with the given memory as backing and set its used
47 * sshp_buf_alloc() - Allocate and initialize a SSH parser buffer.
[all …]
/linux/sound/pci/lola/
H A Dlola_proc.c16 static void print_audio_widget(struct snd_info_buffer *buffer, in print_audio_widget() argument
22 snd_iprintf(buffer, "Node 0x%02x %s wcaps 0x%x\n", nid, name, val); in print_audio_widget()
24 snd_iprintf(buffer, " Formats: 0x%x\n", val); in print_audio_widget()
27 static void print_pin_widget(struct snd_info_buffer *buffer, in print_pin_widget() argument
34 snd_iprintf(buffer, "Node 0x%02x %s wcaps 0x%x\n", nid, name, val); in print_pin_widget()
38 snd_iprintf(buffer, " Amp-Caps: 0x%x\n", val); in print_pin_widget()
39 snd_iprintf(buffer, " mute=%d, step-size=%d, steps=%d, ofs=%d\n", in print_pin_widget()
45 snd_iprintf(buffer, " Max-level: 0x%x\n", val); in print_pin_widget()
48 static void print_clock_widget(struct snd_info_buffer *buffer, in print_clock_widget() argument
55 snd_iprintf(buffer, "Node 0x%02x [Clock] wcaps 0x%x\n", nid, val); in print_clock_widget()
[all …]
/linux/sound/firewire/fireworks/
H A Dfireworks_proc.c28 proc_read_hwinfo(struct snd_info_entry *entry, struct snd_info_buffer *buffer) in proc_read_hwinfo() argument
41 snd_iprintf(buffer, "guid_hi: 0x%X\n", hwinfo->guid_hi); in proc_read_hwinfo()
42 snd_iprintf(buffer, "guid_lo: 0x%X\n", hwinfo->guid_lo); in proc_read_hwinfo()
43 snd_iprintf(buffer, "type: 0x%X\n", hwinfo->type); in proc_read_hwinfo()
44 snd_iprintf(buffer, "version: 0x%X\n", hwinfo->version); in proc_read_hwinfo()
45 snd_iprintf(buffer, "vendor_name: %s\n", hwinfo->vendor_name); in proc_read_hwinfo()
46 snd_iprintf(buffer, "model_name: %s\n", hwinfo->model_name); in proc_read_hwinfo()
48 snd_iprintf(buffer, "dsp_version: 0x%X\n", hwinfo->dsp_version); in proc_read_hwinfo()
49 snd_iprintf(buffer, "arm_version: 0x%X\n", hwinfo->arm_version); in proc_read_hwinfo()
50 snd_iprintf(buffer, "fpga_version: 0x%X\n", hwinfo->fpga_version); in proc_read_hwinfo()
[all …]
/linux/drivers/gpu/drm/vmwgfx/
H A Dvmwgfx_cmdbuf.c45 * struct vmw_cmdbuf_context - Command buffer context queues
63 * struct vmw_cmdbuf_man - Command buffer manager
65 * @cur_mutex: Mutex protecting the command buffer used for incremental small
68 * main pool buffer space.
72 * @work: A struct work_struct implementeing command buffer error handling.
75 * @ctx: Array of command buffer context queues. The queues and the context
79 * @mm: Range manager for the command buffer space. Manager allocations and
81 * @cmd_space: Buffer object for the command buffer space, unless we were
83 * @map: Pointer to command buffer space. May be a mapped buffer object or
85 * @cur: Command buffer for small kernel command submissions. Protected by
[all …]

12345678910>>...202