Home
last modified time | relevance | path

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

12345678910>>...42

/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/android/
H A Dbinder_alloc.c1 // SPDX-License-Identifier: GPL-2.0-only
6 * Copyright (C) 2007-2017 Google, Inc.
51 static struct binder_buffer *binder_buffer_next(struct binder_buffer *buffer) in binder_buffer_next() argument
53 return list_entry(buffer->entry.next, struct binder_buffer, entry); in binder_buffer_next()
56 static struct binder_buffer *binder_buffer_prev(struct binder_buffer *buffer) in binder_buffer_prev() argument
58 return list_entry(buffer->entry.prev, struct binder_buffer, entry); in binder_buffer_prev()
62 struct binder_buffer *buffer) in binder_alloc_buffer_size() argument
64 if (list_is_last(&buffer->entry, &alloc->buffers)) in binder_alloc_buffer_size()
65 return alloc->vm_start + alloc->buffer_size - buffer->user_data; in binder_alloc_buffer_size()
66 return binder_buffer_next(buffer)->user_data - buffer->user_data; in binder_alloc_buffer_size()
[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/drivers/md/dm-vdo/
H A Dencodings.c1 // SPDX-License-Identifier: GPL-2.0-only
11 #include "memory-alloc.h"
15 #include "status-codes.h"
37 * Note: this size isn't just the payload size following the header, like it is everywhere
40 .size = sizeof(struct geometry_block) + sizeof(struct volume_geometry),
50 * Note: this size isn't just the payload size following the header, like it is everywhere
53 .size = sizeof(struct geometry_block) + sizeof(struct volume_geometry_4_0),
71 .size = sizeof(struct block_map_state_2_0),
80 .size = sizeof(struct recovery_journal_state_7_0),
89 .size = sizeof(struct slab_depot_state_2_0),
[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/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 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 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 …]
H A Dtpm_svsm.h1 /* SPDX-License-Identifier: GPL-2.0-only */
12 * [1] "Secure VM Service Module for SEV-SNP Guests"
22 #define SVSM_VTPM_MAX_BUFFER 4096 /* max req/resp buffer size */
25 * struct svsm_vtpm_request - Generic request for single word command
28 * Defined by AMD SVSM spec [1] in section "8.2 SVSM_VTPM_CMD Call" -
30 * Byte Size     In/Out    Description
33  *                         Out       Platform command response size
40 * struct svsm_vtpm_response - Generic response
41 * @size: The response size (zero if nothing follows)
43 * Defined by AMD SVSM spec [1] in section "8.2 SVSM_VTPM_CMD Call" -
[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
17 char buffer[256], *pbuffer; in snd_gus_dram_poke()
19 while (size > 0) { in snd_gus_dram_poke()
20 size1 = size > sizeof(buffer) in snd_gus_dram_poke()
18 char buffer[256], *pbuffer; snd_gus_dram_poke() local
44 snd_gus_dram_write(struct snd_gus_card * gus,char __user * buffer,unsigned int address,unsigned int size) snd_gus_dram_write() argument
45 snd_gus_dram_write(struct snd_gus_card * gus,char __user * buffer,unsigned int address,unsigned int size) snd_gus_dram_write() argument
51 snd_gus_dram_peek(struct snd_gus_card * gus,char __user * _buffer,unsigned int address,unsigned int size,int rom) snd_gus_dram_peek() argument
56 char buffer[256], *pbuffer; snd_gus_dram_peek() local
82 snd_gus_dram_read(struct snd_gus_card * gus,char __user * buffer,unsigned int address,unsigned int size,int rom) snd_gus_dram_read() argument
83 snd_gus_dram_read(struct snd_gus_card * gus,char __user * buffer,unsigned int address,unsigned int size,int rom) snd_gus_dram_read() 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/wangxun/libwx/
H A Dwx_mbx.c1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (c) 2015 - 2025 Beijing WangXun Technology Co., Ltd. */
9 * wx_obtain_mbx_lock_pf - obtain mailbox lock
13 * Return: return 0 on success and -EBUSY on failure
20 while (count--) { in wx_obtain_mbx_lock_pf()
21 /* Take ownership of the buffer */ in wx_obtain_mbx_lock_pf()
33 return -EBUSY; in wx_obtain_mbx_lock_pf()
41 return -EBUSY; in wx_check_for_bit_pf()
48 * wx_check_for_ack_pf - checks to see if the VF has acked
52 * Return: return 0 if the VF has set the status bit or else -EBUSY
[all …]
/linux/kernel/
H A Dsysctl.c1 // SPDX-License-Identifier: GPL-2.0-only
27 const int sysctl_vals[] = { 0, 1, 2, 3, 4, 100, 200, 1000, 3000, INT_MAX, 65535, -1 };
42 * enum sysctl_writes_mode - supported sysctl write modes
51 * file position 0 and the value must be fully contained in the buffer
53 * position, but restrict this to the max length of the buffer, anything
55 * to the buffer.
61 SYSCTL_WRITES_LEGACY = -1,
77 char *buffer, size_t *lenp, loff_t *ppos) in _proc_do_string() argument
89 /* Only continue writes not past the end of buffer. */ in _proc_do_string()
91 if (len > maxlen - 1) in _proc_do_string()
[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/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 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%p\n", in check_buffer_underflow_by_byte()
[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/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
37 * etr_perf_buffer - Perf buffer used for ETR
38 * @drvdata - The ETR drvdaga this buffer has been allocated for.
39 * @etr_buf - Actual buffer used by the ETR
[all …]
/linux/fs/afs/
H A Dxattr.c1 // SPDX-License-Identifier: GPL-2.0-or-later
19 afs_vnode_commit_status(op, &op->file[0]); in afs_acl_success()
24 kfree(op->acl); in afs_acl_put()
39 void *buffer, size_t size) in afs_xattr_get_acl() argument
46 op = afs_alloc_operation(NULL, vnode->volume); in afs_xattr_get_acl()
48 return -ENOMEM; in afs_xattr_get_acl()
51 op->ops = &afs_fetch_acl_operation; in afs_xattr_get_acl()
55 acl = op->acl; in afs_xattr_get_acl()
56 op->acl = NULL; in afs_xattr_get_acl()
60 ret = acl->size; in afs_xattr_get_acl()
[all …]
/linux/drivers/accel/habanalabs/common/
H A Dstate_dump.c1 // SPDX-License-Identifier: GPL-2.0
13 * hl_format_as_binary - helper function, format an integer as binary
14 * using supplied scratch buffer
15 * @buf: the buffer to use
16 * @buf_len: buffer capacity
19 * Returns pointer to buffer
37 buf_len -= 3; in hl_format_as_binary()
43 bit = n & (1 << (sizeof(n) * BITS_PER_BYTE - 1)); in hl_format_as_binary()
58 * resize_to_fit - helper function, resize buffer to fit given amount of data
59 * @buf: destination buffer double pointer
[all …]
/linux/lib/
H A Dseq_buf.c1 // SPDX-License-Identifier: GPL-2.0
8 * to a buffer that other functions can write to. It is similar to the
31 * seq_buf_can_fit - can the new data fit in the current buffer?
33 * @len: The length to see if it can fit in the current buffer
35 * Returns: true if there's enough unused space in the seq_buf buffer
40 return s->len + len <= s->size; in seq_buf_can_fit()
44 * seq_buf_print_seq - move the contents of seq_buf into a seq_file
48 * Returns: zero on success, non-zero otherwise.
54 return seq_write(m, s->buffer, len); in seq_buf_print_seq()
58 * seq_buf_vprintf - sequence printing of information.
[all …]
/linux/drivers/net/ethernet/netronome/nfp/
H A 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>>...42