Home
last modified time | relevance | path

Searched +full:buffer +full:- +full:size (Results 1 – 25 of 1113) sorted by relevance

12345678910>>...45

/linux-6.8/tools/testing/selftests/mm/
Dhmm-tests.c1 // SPDX-License-Identifier: GPL-2.0
40 unsigned long size; member
58 #define ALIGN(x, a) (((x) + (a - 1)) & (~((a) - 1)))
136 self->page_size = sysconf(_SC_PAGE_SIZE); in FIXTURE_SETUP()
137 self->page_shift = ffs(self->page_size) - 1; in FIXTURE_SETUP()
139 self->fd = hmm_open(variant->device_number); in FIXTURE_SETUP()
140 if (self->fd < 0 && hmm_is_coherent_type(variant->device_number)) in FIXTURE_SETUP()
142 ASSERT_GE(self->fd, 0); in FIXTURE_SETUP()
147 self->page_size = sysconf(_SC_PAGE_SIZE); in FIXTURE_SETUP()
148 self->page_shift = ffs(self->page_size) - 1; in FIXTURE_SETUP()
[all …]
/linux-6.8/drivers/android/
Dbinder_alloc.c1 // SPDX-License-Identifier: GPL-2.0-only
6 * Copyright (C) 2007-2017 Google, Inc.
50 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()
[all …]
/linux-6.8/drivers/video/
Dhdmi.c17 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
35 static u8 hdmi_infoframe_checksum(const u8 *ptr, size_t size) in hdmi_infoframe_checksum() argument
41 for (i = 0; i < size; i++) in hdmi_infoframe_checksum()
44 return 256 - csum; in hdmi_infoframe_checksum()
47 static void hdmi_infoframe_set_checksum(void *buffer, size_t size) in hdmi_infoframe_set_checksum() argument
49 u8 *ptr = buffer; in hdmi_infoframe_set_checksum()
51 ptr[3] = hdmi_infoframe_checksum(buffer, size); in hdmi_infoframe_set_checksum()
55 * hdmi_avi_infoframe_init() - initialize an HDMI AVI infoframe
62 frame->type = HDMI_INFOFRAME_TYPE_AVI; in hdmi_avi_infoframe_init()
63 frame->version = 2; in hdmi_avi_infoframe_init()
[all …]
/linux-6.8/drivers/gpu/drm/vmwgfx/
Dvmwgfx_cmdbuf.c1 // SPDX-License-Identifier: GPL-2.0 OR MIT
4 * Copyright 2015-2023 VMware, Inc., Palo Alto, CA., USA
20 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
37 * Size of inline command buffers. Try to make sure that a page size is a
38 * multiple of the DMA pool allocation size.
42 (1024 - ALIGN(sizeof(SVGACBHeader), VMW_CMDBUF_INLINE_ALIGN))
45 * 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.
[all …]
/linux-6.8/drivers/net/ethernet/mellanox/mlx5/core/en/
Dport_buffer.c14 * - Redistributions of source code must retain the above
18 * - Redistributions in binary form must reproduce the above
37 u16 port_buff_cell_sz = priv->dcbx.port_buff_cell_sz; in mlx5e_port_query_buffer()
38 struct mlx5_core_dev *mdev = priv->mdev; in mlx5e_port_query_buffer()
41 void *buffer; in mlx5e_port_query_buffer() local
48 return -ENOMEM; in mlx5e_port_query_buffer()
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()
[all …]
/linux-6.8/tools/testing/selftests/drivers/net/mlxsw/
Dqos_headroom.sh2 # SPDX-License-Identifier: GPL-2.0
32 # of buffer that priority X is mapped to.
33 dcb -j buffer show dev $swp |
34 jq -r '[.prio_buffer | .[] | tostring + " "] | add'
41 dcb -j pfc show dev $swp |
42 jq -r '[.prio_pfc | .[] | if . then "1 " else "0 " end] | add'
49 dcb -j ets show dev $swp |
50 jq -r '[.prio_tc | .[] | tostring + " "] | add'
57 dcb -j buffer show dev $swp | jq ".buffer_size[$idx]"
62 dcb -j buffer show dev $swp | jq '.total_size'
[all …]
/linux-6.8/include/linux/
Dseq_buf.h1 /* SPDX-License-Identifier: GPL-2.0 */
16 * struct seq_buf - seq buffer structure
17 * @buffer: pointer to the buffer
18 * @size: size of the buffer
19 * @len: the amount of data inside the buffer
22 char *buffer; member
23 size_t size; member
27 #define DECLARE_SEQ_BUF(NAME, SIZE) \ argument
29 .buffer = (char[SIZE]) { 0 }, \
30 .size = SIZE, \
[all …]
Dlz4.h4 * Copyright (C) 2016, Sven Schmidt <4sschmid@informatik.uni-hamburg.de>
11 * for LZ4 - Fast LZ compression algorithm.
13 * LZ4 - Fast LZ compression algorithm
14 * Copyright (C) 2011-2016, Yann Collet.
15 * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
37 * - LZ4 homepage : http://www.lz4.org
38 * - LZ4 source repository : https://github.com/lz4/lz4
47 /*-************************************************************************
52 * Memory usage formula : N->2^N Bytes
53 * (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB; etc.)
[all …]
Dring_buffer.h1 /* SPDX-License-Identifier: GPL-2.0 */
22 * enum ring_buffer_type - internal ring buffer types
27 * size is variable depending on how much
31 * size = 4 + length (bytes)
35 * size = 8 bytes
42 * size = 8 bytes
49 * size = 4 + length (bytes)
52 * array[0..(length+3)/4-1] holds data
53 * size = 4 + length (bytes)
64 u64 ring_buffer_event_time_stamp(struct trace_buffer *buffer,
[all …]
/linux-6.8/drivers/tty/
Dtty_buffer.c1 // SPDX-License-Identifier: GPL-2.0
3 * Tty buffer allocation management
33 * We default to dicing tty buffer allocations to this many characters
34 * in order to avoid multiple page allocations. We know the size of
36 * buffer is 256 byte aligned. See tty_buffer_find for the allocation
40 #define TTY_BUFFER_PAGE (((PAGE_SIZE - sizeof(struct tty_buffer)) / 2) & ~TTYB_ALIGN_MASK)
43 * tty_buffer_lock_exclusive - gain exclusive access to buffer
44 * @port: tty port owning the flip buffer
47 * the buffer work and any pending flush from using the flip buffer. Data can
48 * continue to be added concurrently to the flip buffer from the driver side.
[all …]
/linux-6.8/sound/core/
Dpcm_memory.c1 // SPDX-License-Identifier: GPL-2.0-or-later
36 card->total_pcm_alloc_bytes += bytes; in __update_allocated_size()
41 mutex_lock(&card->memory_mutex); in update_allocated_size()
43 mutex_unlock(&card->memory_mutex); in update_allocated_size()
48 mutex_lock(&card->memory_mutex); in decrease_allocated_size()
49 WARN_ON(card->total_pcm_alloc_bytes < bytes); in decrease_allocated_size()
50 __update_allocated_size(card, -(ssize_t)bytes); in decrease_allocated_size()
51 mutex_unlock(&card->memory_mutex); in decrease_allocated_size()
55 int str, size_t size, struct snd_dma_buffer *dmab) in do_alloc_pages() argument
60 /* check and reserve the requested size */ in do_alloc_pages()
[all …]
Dmemalloc.c1 // SPDX-License-Identifier: GPL-2.0-or-later
11 #include <linux/dma-mapping.h>
12 #include <linux/dma-map-ops.h>
24 __GFP_RETRY_MAYFAIL | /* don't trigger OOM-killer */ \
25 __GFP_NOWARN) /* no stack trace print - this call is non-critical */
30 static void *snd_dma_sg_fallback_alloc(struct snd_dma_buffer *dmab, size_t size);
33 static void *__snd_dma_alloc_pages(struct snd_dma_buffer *dmab, size_t size) in __snd_dma_alloc_pages() argument
37 if (WARN_ON_ONCE(!ops || !ops->alloc)) in __snd_dma_alloc_pages()
39 return ops->alloc(dmab, size); in __snd_dma_alloc_pages()
43 * snd_dma_alloc_dir_pages - allocate the buffer area according to the given
[all …]
/linux-6.8/fs/pstore/
Dram_core.c1 // SPDX-License-Identifier: GPL-2.0-only
26 * struct persistent_ram_buffer - persistent circular RAM buffer
28 * @sig: Signature to indicate header (PERSISTENT_RAM_SIG xor PRZ-type value)
29 * @start: First valid byte in the buffer.
30 * @size: Number of valid bytes in the buffer.
31 * @data: The contents of the buffer.
36 atomic_t size; member
44 return atomic_read(&prz->buffer->size); in buffer_size()
49 return atomic_read(&prz->buffer->start); in buffer_start()
59 if (!(prz->flags & PRZ_FLAG_NO_LOCK)) in buffer_start_add()
[all …]
/linux-6.8/sound/isa/gus/
Dgus_dram.c1 // SPDX-License-Identifier: GPL-2.0-or-later
14 unsigned int address, unsigned int size) in snd_gus_dram_poke() argument
18 char buffer[256], *pbuffer; in snd_gus_dram_poke() local
20 while (size > 0) { in snd_gus_dram_poke()
21 size1 = size > sizeof(buffer) ? sizeof(buffer) : size; in snd_gus_dram_poke()
22 if (copy_from_user(buffer, _buffer, size1)) in snd_gus_dram_poke()
23 return -EFAULT; in snd_gus_dram_poke()
24 if (gus->interwave) { in snd_gus_dram_poke()
25 spin_lock_irqsave(&gus->reg_lock, flags); in snd_gus_dram_poke()
28 outsb(GUSP(gus, DRAM), buffer, size1); in snd_gus_dram_poke()
[all …]
/linux-6.8/lib/
Dkunit_iov_iter.c1 // SPDX-License-Identifier: GPL-2.0-only
2 /* I/O iterator tests. This can only test kernel-backed iterator types.
34 { -1 }
53 void *buffer; in iov_kunit_create_buffer() local
65 buffer = vmap(pages, npages, VM_MAP | VM_MAP_PUT_PAGES, PAGE_KERNEL); in iov_kunit_create_buffer()
66 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, buffer); in iov_kunit_create_buffer()
68 kunit_add_action_or_reset(test, iov_kunit_unmap, buffer); in iov_kunit_create_buffer()
69 return buffer; in iov_kunit_create_buffer()
75 void *buffer, size_t bufsize, in iov_kunit_load_kvec() argument
78 size_t size = 0; in iov_kunit_load_kvec() local
[all …]
/linux-6.8/drivers/infiniband/hw/hfi1/
Deprom.c1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
14 * partition 1: 4K config file (sector size)
22 /* controller page size, in bytes */
24 #define EP_PAGE_MASK (EP_PAGE_SIZE - 1)
62 u32 buffer[EP_PAGE_DWORDS]; in read_length() local
75 * command address range. Note that '>' is correct below - the end in read_length()
79 return -EINVAL; in read_length()
88 read_page(dd, read_start, buffer); in read_length()
91 bytes = EP_PAGE_SIZE - start_offset; in read_length()
95 memcpy(dest, (u8 *)buffer + start_offset, len); in read_length()
[all …]
/linux-6.8/drivers/net/ethernet/intel/ixgbe/
Dixgbe_mbx.c1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 1999 - 2018 Intel Corporation. */
10 * ixgbe_read_mbx - Reads a message from the mailbox
12 * @msg: The message buffer
13 * @size: Length of buffer
16 * returns SUCCESS if it successfully read message from buffer
18 s32 ixgbe_read_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size, u16 mbx_id) in ixgbe_read_mbx() argument
20 struct ixgbe_mbx_info *mbx = &hw->mbx; in ixgbe_read_mbx()
22 /* limit read to size of mailbox */ in ixgbe_read_mbx()
23 if (size > mbx->size) in ixgbe_read_mbx()
[all …]
/linux-6.8/include/crypto/
Ddh.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Diffie-Hellman secret to be used with kpp API along with helper functions
23 * struct dh - define a DH private key
26 * @p: Diffie-Hellman parameter P
27 * @g: Diffie-Hellman generator G
28 * @key_size: Size of the private DH key
29 * @p_size: Size of DH parameter P
30 * @g_size: Size of DH generator G
42 * crypto_dh_key_len() - Obtain the size of the private DH key
45 * This function returns the packet DH key size. A caller can use that
[all …]
/linux-6.8/drivers/net/ethernet/qlogic/qed/
Dqed_dbg_hsi.h1 /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
3 * Copyright (c) 2019-2021 Marvell International Ltd.
116 /* binary debug buffer types */
149 /* Attention block per-type data */
224 /* Chip-specific block debug data */
254 /* Chip-specific block user debug data */
282 u8 data_size; /* size in dwords of the data following this header */
324 u16 data_size; /* size in dwords of the data following this header */
350 u16 size; /* register size in dwords */ member
378 u16 size; /* register size in dwords */ member
[all …]
/linux-6.8/tools/testing/selftests/arm64/mte/
Dcheck_buffer_fill.c1 // SPDX-License-Identifier: GPL-2.0
17 1, 555, 1033, MT_GRANULE_SIZE - 1, MT_GRANULE_SIZE,
18 /* page size - 1*/ 0, /* page_size */ 0, /* page size + 1 */ 0
47 /* Check the buffer whether it is filled. */ in check_buffer_by_byte()
80 mte_initialize_current_context(mode, (uintptr_t)ptr, -underflow_range); in check_buffer_underflow_by_byte()
82 /* Set some value in tagged memory and make the buffer underflow */ in check_buffer_underflow_by_byte()
83 for (j = sizes[i] - 1; (j >= -underflow_range) && in check_buffer_underflow_by_byte()
84 (!cur_mte_cxt.fault_valid); j--) { in check_buffer_underflow_by_byte()
90 /* Check whether the buffer is filled */ in check_buffer_underflow_by_byte()
94 ksft_print_msg("Buffer is not filled at index:%d of ptr:0x%lx\n", in check_buffer_underflow_by_byte()
[all …]
/linux-6.8/drivers/hwtracing/coresight/
Dcoresight-tmc-etr.c1 // SPDX-License-Identifier: GPL-2.0
9 #include <linux/dma-mapping.h>
17 #include "coresight-catu.h"
18 #include "coresight-etm-perf.h"
19 #include "coresight-priv.h"
20 #include "coresight-tmc.h"
26 size_t size; member
36 * etr_perf_buffer - Perf buffer used for ETR
37 * @drvdata - The ETR drvdaga this buffer has been allocated for.
38 * @etr_buf - Actual buffer used by the ETR
[all …]
/linux-6.8/drivers/net/ethernet/intel/igb/
De1000_mbx.c1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 2007 - 2018 Intel Corporation. */
7 * igb_read_mbx - Reads a message from the mailbox
9 * @msg: The message buffer
10 * @size: Length of buffer
14 * returns SUCCESS if it successfully read message from buffer
16 s32 igb_read_mbx(struct e1000_hw *hw, u32 *msg, u16 size, u16 mbx_id, in igb_read_mbx() argument
19 struct e1000_mbx_info *mbx = &hw->mbx; in igb_read_mbx()
20 s32 ret_val = -E1000_ERR_MBX; in igb_read_mbx()
22 /* limit read to size of mailbox */ in igb_read_mbx()
[all …]
/linux-6.8/drivers/staging/media/atomisp/pci/base/circbuf/interface/
Dia_css_circbuf.h1 /* SPDX-License-Identifier: GPL-2.0 */
33 * @brief Data structure for the circular buffer.
42 * @brief Create the circular buffer.
44 * @param cb The pointer to the circular buffer.
46 * @param desc The descriptor set to the size using ia_css_circbuf_desc_init().
54 * @brief Destroy the circular buffer.
56 * @param cb The pointer to the circular buffer.
62 * @brief Pop a value out of the circular buffer.
63 * Get a value at the head of the circular buffer.
65 * to avoid accessing to an empty buffer.
[all …]
/linux-6.8/drivers/gpu/drm/amd/amdkfd/
Dkfd_packet_manager.c1 // SPDX-License-Identifier: GPL-2.0 OR MIT
3 * Copyright 2014-2022 Advanced Micro Devices, Inc.
48 struct kfd_node *dev = pm->dqm->dev; in pm_calc_rlib_size()
50 process_count = pm->dqm->processes_count; in pm_calc_rlib_size()
51 queue_count = pm->dqm->active_queue_count; in pm_calc_rlib_size()
52 compute_queue_count = pm->dqm->active_cp_queue_count; in pm_calc_rlib_size()
53 gws_queue_count = pm->dqm->gws_queue_count; in pm_calc_rlib_size()
62 if (dev->max_proc_per_quantum > 1) in pm_calc_rlib_size()
63 max_proc_per_quantum = dev->max_proc_per_quantum; in pm_calc_rlib_size()
66 compute_queue_count > get_cp_queues_num(pm->dqm) || in pm_calc_rlib_size()
[all …]
/linux-6.8/drivers/net/ethernet/netronome/nfp/
Dnfp_abi.h1 /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
19 * enum nfp_mbox_cmd - PF mailbox commands
24 * @NFP_MBOX_POOL_GET: get shared buffer pool info/config
25 * Input - struct nfp_shared_buf_pool_id
26 * Output - struct nfp_shared_buf_pool_info_get
28 * @NFP_MBOX_POOL_SET: set shared buffer pool info/config
29 * Input - struct nfp_shared_buf_pool_info_set
30 * Output - None
32 * @NFP_MBOX_PCIE_ABM_ENABLE: enable PCIe-side advanced buffer management
33 * Enable advanced buffer management of the PCIe block. If ABM is disabled
[all …]

12345678910>>...45