Home
last modified time | relevance | path

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

12345678910>>...44

/linux/tools/testing/selftests/mm/
H A 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/drivers/video/
H A 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/drivers/gpu/drm/vmwgfx/
H A 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/drivers/net/ethernet/mellanox/mlx5/core/en/
H A 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/tools/testing/selftests/drivers/net/mlxsw/
H A 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/include/linux/
H A 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 …]
H A Dring_buffer.h1 /* SPDX-License-Identifier: GPL-2.0 */
24 * enum ring_buffer_type - internal ring buffer types
29 * size is variable depending on how much
33 * size = 4 + length (bytes)
37 * size = 8 bytes
44 * size = 8 bytes
51 * size = 4 + length (bytes)
54 * array[0..(length+3)/4-1] holds data
55 * size = 4 + length (bytes)
66 u64 ring_buffer_event_time_stamp(struct trace_buffer *buffer,
[all …]
H A 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 …]
H A Dzstd.h1 /* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */
6 * This source code is licensed under both the BSD-style license (found in the
10 * above-listed licenses.
17 * This is a kernel-style API that wraps the upstream zstd API, which cannot be
30 * zstd_compress_bound() - maximum compressed size in worst case scenario
31 * @src_size: The size of the data to compress.
33 * Return: The maximum compressed size in the worst case scenario.
38 * zstd_is_error() - tells if a size_t function result is an error code
41 * Return: Non-zero iff the code is an error.
46 * enum zstd_error_code - zstd error codes
[all …]
/linux/drivers/tty/
H A Dtty_buffer.c1 // SPDX-License-Identifier: GPL-2.0
3 * Tty buffer allocation management
34 * We default to dicing tty buffer allocations to this many characters
35 * in order to avoid multiple page allocations. We know the size of
37 * buffer is 256 byte aligned. See tty_buffer_find for the allocation
41 #define TTY_BUFFER_PAGE (((PAGE_SIZE - sizeof(struct tty_buffer)) / 2) & ~TTYB_ALIGN_MASK)
44 * tty_buffer_lock_exclusive - gain exclusive access to buffer
45 * @port: tty port owning the flip buffer
48 * the buffer work and any pending flush from using the flip buffer. Data can
49 * continue to be added concurrently to the flip buffer from the driver side.
[all …]
/linux/sound/core/
H A Dpcm_memory.c1 // SPDX-License-Identifier: GPL-2.0-or-later
35 card->total_pcm_alloc_bytes += bytes; in __update_allocated_size()
40 guard(mutex)(&card->memory_mutex); in update_allocated_size()
46 guard(mutex)(&card->memory_mutex); in decrease_allocated_size()
47 WARN_ON(card->total_pcm_alloc_bytes < bytes); in decrease_allocated_size()
48 __update_allocated_size(card, -(ssize_t)bytes); in decrease_allocated_size()
52 int str, size_t size, struct snd_dma_buffer *dmab) in do_alloc_pages() argument
57 /* check and reserve the requested size */ in do_alloc_pages()
58 scoped_guard(mutex, &card->memory_mutex) { in do_alloc_pages()
60 card->total_pcm_alloc_bytes + size > max_alloc_per_card) in do_alloc_pages()
[all …]
H A Dmemalloc.c1 // SPDX-License-Identifier: GPL-2.0-or-later
11 #include <linux/dma-mapping.h>
12 #include <linux/dma-map-ops.h>
22 void *(*alloc)(struct snd_dma_buffer *dmab, size_t size);
27 unsigned int ofs, unsigned int size);
34 __GFP_RETRY_MAYFAIL | /* don't trigger OOM-killer */ \
35 __GFP_NOWARN) /* no stack trace print - this call is non-critical */
39 static void *__snd_dma_alloc_pages(struct snd_dma_buffer *dmab, size_t size) in __snd_dma_alloc_pages() argument
43 if (WARN_ON_ONCE(!ops || !ops->alloc)) in __snd_dma_alloc_pages()
45 return ops->alloc(dmab, size); in __snd_dma_alloc_pages()
[all …]
/linux/fs/pstore/
H A 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/sound/isa/gus/
H A 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/lib/
H A Dkunit_iov_iter.c1 // SPDX-License-Identifier: GPL-2.0-only
2 /* I/O iterator tests. This can only test kernel-backed iterator types.
35 { -1 }
54 void *buffer; in iov_kunit_create_buffer() local
67 pages[i]->index = i; in iov_kunit_create_buffer()
69 buffer = vmap(pages, npages, VM_MAP | VM_MAP_PUT_PAGES, PAGE_KERNEL); in iov_kunit_create_buffer()
70 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, buffer); in iov_kunit_create_buffer()
72 kunit_add_action_or_reset(test, iov_kunit_unmap, buffer); in iov_kunit_create_buffer()
73 return buffer; in iov_kunit_create_buffer()
79 void *buffer, size_t bufsize, in iov_kunit_load_kvec() argument
[all …]
/linux/drivers/infiniband/hw/hfi1/
H A 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/drivers/net/ethernet/intel/ixgbe/
H A 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 int 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/include/crypto/
H A 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/drivers/hwtracing/coresight/
H A 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/drivers/net/ethernet/qlogic/qed/
H A 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/tools/testing/selftests/arm64/mte/
H A 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 underflo in check_buffer_underflow_by_byte()
261 check_buffer_by_block_iterate(int mem_type,int mode,size_t size) check_buffer_by_block_iterate() argument
351 compare_memory_tags(char * ptr,size_t size,int tag) compare_memory_tags() argument
[all...]
/linux/drivers/net/ethernet/intel/igb/
H A 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/drivers/iio/buffer/
H A Dindustrialio-buffer-dma.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright 2013-2015 Analog Devices Inc.
4 * Author: Lars-Peter Clausen <lars@metafoo.de>
18 #include <linux/iio/buffer-dma.h>
19 #include <linux/dma-buf.h>
20 #include <linux/dma-fence.h>
21 #include <linux/dma-mapping.h>
25 * For DMA buffers the storage is sub-divided into so called blocks. Each block
26 * has its own memory buffer. The size of the block is the granularity at which
73 * the actual number of bytes in the buffer. Typically this will be equal to the
[all …]
/linux/drivers/gpu/drm/amd/amdkfd/
H A Dkfd_packet_manager.c1 // SPDX-License-Identifier: GPL-2.0 OR MIT
3 * Copyright 2014-2022 Advanced Micro Devices, Inc.
48 struct kfd_node *node = pm->dqm->dev; in pm_calc_rlib_size()
49 struct device *dev = node->adev->dev; in pm_calc_rlib_size()
51 process_count = pm->dqm->processes_count; in pm_calc_rlib_size()
52 queue_count = pm->dqm->active_queue_count; in pm_calc_rlib_size()
53 compute_queue_count = pm->dqm->active_cp_queue_count; in pm_calc_rlib_size()
54 gws_queue_count = pm->dqm->gws_queue_count; in pm_calc_rlib_size()
63 if (node->max_proc_per_quantum > 1) in pm_calc_rlib_size()
64 max_proc_per_quantum = node->max_proc_per_quantum; in pm_calc_rlib_size()
[all …]
/linux/drivers/net/ethernet/intel/ixgbevf/
H A Dmbx.c1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 1999 - 2018 Intel Corporation. */
8 * ixgbevf_poll_for_msg - Wait for message notification
15 struct ixgbe_mbx_info *mbx = &hw->mbx; in ixgbevf_poll_for_msg()
16 int countdown = mbx->timeout; in ixgbevf_poll_for_msg()
18 if (!countdown || !mbx->ops.check_for_msg) in ixgbevf_poll_for_msg()
21 while (countdown && mbx->ops.check_for_msg(hw)) { in ixgbevf_poll_for_msg()
22 countdown--; in ixgbevf_poll_for_msg()
23 udelay(mbx->udelay); in ixgbevf_poll_for_msg()
30 * ixgbevf_poll_for_ack - Wait for message acknowledgment
[all …]

12345678910>>...44