Home
last modified time | relevance | path

Searched refs:buf_size (Results 1 – 25 of 420) sorted by relevance

12345678910>>...17

/linux/drivers/char/tpm/
H A Dtpm-buf.c10 static void __tpm_buf_size_invariant(struct tpm_buf *buf, u16 buf_size) in __tpm_buf_size_invariant() argument
15 if (buf_size > TPM_BUFSIZE) { in __tpm_buf_size_invariant()
16 WARN(1, "%s: size overflow: %u\n", __func__, buf_size); in __tpm_buf_size_invariant()
20 if (buf_size != buf_size_2) { in __tpm_buf_size_invariant()
22 buf_size, buf_size_2); in __tpm_buf_size_invariant()
28 static void __tpm_buf_reset(struct tpm_buf *buf, u16 buf_size, u16 tag, in __tpm_buf_reset() argument
33 __tpm_buf_size_invariant(buf, buf_size); in __tpm_buf_reset()
43 buf->capacity = buf_size - sizeof(*buf); in __tpm_buf_reset()
50 static void __tpm_buf_reset_sized(struct tpm_buf *buf, u16 buf_size) in __tpm_buf_reset_sized() argument
52 __tpm_buf_size_invariant(buf, buf_size); in __tpm_buf_reset_sized()
[all …]
H A Dtpm2-space.c28 int tpm2_init_space(struct tpm_space *space, unsigned int buf_size) in tpm2_init_space() argument
30 space->context_buf = kzalloc(buf_size, GFP_KERNEL); in tpm2_init_space()
34 space->session_buf = kzalloc(buf_size, GFP_KERNEL); in tpm2_init_space()
42 space->buf_size = buf_size; in tpm2_init_space()
109 unsigned int buf_size, unsigned int *offset) in tpm2_save_context() argument
136 if ((*offset + body_size) > buf_size) { in tpm2_save_context()
303 space->buf_size); in tpm2_prepare_space()
305 space->buf_size); in tpm2_prepare_space()
488 space->context_buf, space->buf_size, in tpm2_save_space()
505 space->session_buf, space->buf_size, in tpm2_save_space()
[all …]
/linux/drivers/ntb/hw/intel/
H A Dntb_hw_gen3.c264 size_t buf_size; in ndev_ntb3_debugfs_read() local
271 buf_size = min(count, 0x800ul); in ndev_ntb3_debugfs_read()
273 buf = kmalloc(buf_size, GFP_KERNEL); in ndev_ntb3_debugfs_read()
279 off += scnprintf(buf + off, buf_size - off, in ndev_ntb3_debugfs_read()
282 off += scnprintf(buf + off, buf_size - off, in ndev_ntb3_debugfs_read()
286 off += scnprintf(buf + off, buf_size - off, in ndev_ntb3_debugfs_read()
288 off += scnprintf(buf + off, buf_size - off, in ndev_ntb3_debugfs_read()
292 off += scnprintf(buf + off, buf_size - off, in ndev_ntb3_debugfs_read()
295 off += scnprintf(buf + off, buf_size - off, in ndev_ntb3_debugfs_read()
297 off += scnprintf(buf + off, buf_size - off, in ndev_ntb3_debugfs_read()
[all …]
H A Dntb_hw_gen4.c235 size_t buf_size; in ndev_ntb4_debugfs_read() local
242 buf_size = min(count, 0x800ul); in ndev_ntb4_debugfs_read()
244 buf = kmalloc(buf_size, GFP_KERNEL); in ndev_ntb4_debugfs_read()
250 off += scnprintf(buf + off, buf_size - off, in ndev_ntb4_debugfs_read()
253 off += scnprintf(buf + off, buf_size - off, in ndev_ntb4_debugfs_read()
257 off += scnprintf(buf + off, buf_size - off, in ndev_ntb4_debugfs_read()
259 off += scnprintf(buf + off, buf_size - off, in ndev_ntb4_debugfs_read()
263 off += scnprintf(buf + off, buf_size - off, in ndev_ntb4_debugfs_read()
266 off += scnprintf(buf + off, buf_size - off, in ndev_ntb4_debugfs_read()
268 off += scnprintf(buf + off, buf_size - off, in ndev_ntb4_debugfs_read()
[all …]
H A Dntb_hw_gen1.c498 size_t buf_size; in ndev_ntb_debugfs_read() local
506 buf_size = min(count, 0x800ul); in ndev_ntb_debugfs_read()
508 buf = kmalloc(buf_size, GFP_KERNEL); in ndev_ntb_debugfs_read()
514 off += scnprintf(buf + off, buf_size - off, in ndev_ntb_debugfs_read()
517 off += scnprintf(buf + off, buf_size - off, in ndev_ntb_debugfs_read()
522 off += scnprintf(buf + off, buf_size - off, in ndev_ntb_debugfs_read()
524 off += scnprintf(buf + off, buf_size - off, in ndev_ntb_debugfs_read()
528 off += scnprintf(buf + off, buf_size - off, in ndev_ntb_debugfs_read()
532 off += scnprintf(buf + off, buf_size - off, in ndev_ntb_debugfs_read()
534 off += scnprintf(buf + off, buf_size - off, in ndev_ntb_debugfs_read()
[all …]
/linux/drivers/media/platform/ti/omap3isp/
H A Dispstat.c62 u32 buf_size, enum dma_data_direction dir, in __isp_stat_buf_sync_magic() argument
69 dma_sync(stat->isp->dev, buf->dma_addr + (buf_size & PAGE_MASK), in __isp_stat_buf_sync_magic()
70 buf_size & ~PAGE_MASK, MAGIC_SIZE, dir); in __isp_stat_buf_sync_magic()
75 u32 buf_size, in isp_stat_buf_sync_magic_for_device() argument
81 __isp_stat_buf_sync_magic(stat, buf, buf_size, dir, in isp_stat_buf_sync_magic_for_device()
87 u32 buf_size, in isp_stat_buf_sync_magic_for_cpu() argument
93 __isp_stat_buf_sync_magic(stat, buf, buf_size, dir, in isp_stat_buf_sync_magic_for_cpu()
100 const u32 buf_size = IS_H3A_AF(stat) ? in isp_stat_buf_check_magic() local
101 buf->buf_size + AF_EXTRA_DATA : buf->buf_size; in isp_stat_buf_check_magic()
106 isp_stat_buf_sync_magic_for_cpu(stat, buf, buf_size, DMA_FROM_DEVICE); in isp_stat_buf_check_magic()
[all …]
H A Disph3a_aewb.c75 aewb->buf_size = conf->buf_size; in h3a_aewb_setup_regs()
115 u32 buf_size; in h3a_aewb_validate_params() local
163 buf_size = h3a_aewb_get_buf_size(user_cfg); in h3a_aewb_validate_params()
164 if (buf_size > user_cfg->buf_size) in h3a_aewb_validate_params()
165 user_cfg->buf_size = buf_size; in h3a_aewb_validate_params()
166 else if (user_cfg->buf_size > OMAP3ISP_AEWB_MAX_BUF_SIZE) in h3a_aewb_validate_params()
167 user_cfg->buf_size = OMAP3ISP_AEWB_MAX_BUF_SIZE; in h3a_aewb_validate_params()
237 cur_cfg->buf_size = h3a_aewb_get_buf_size(cur_cfg); in h3a_aewb_set_params()
330 aewb_recover_cfg->buf_size = h3a_aewb_get_buf_size(aewb_recover_cfg); in omap3isp_h3a_aewb_init()
H A Disph3a_af.c125 af->buf_size = conf->buf_size; in h3a_af_setup_regs()
159 u32 buf_size; in h3a_af_validate_params() local
216 buf_size = h3a_af_get_buf_size(user_cfg); in h3a_af_validate_params()
217 if (buf_size > user_cfg->buf_size) in h3a_af_validate_params()
219 user_cfg->buf_size = buf_size; in h3a_af_validate_params()
220 else if (user_cfg->buf_size > OMAP3ISP_AF_MAX_BUF_SIZE) in h3a_af_validate_params()
221 user_cfg->buf_size = OMAP3ISP_AF_MAX_BUF_SIZE; in h3a_af_validate_params()
301 cur_cfg->buf_size = h3a_af_get_buf_size(cur_cfg); in h3a_af_set_params()
388 af_recover_cfg->buf_size = h3a_af_get_buf_size(af_recover_cfg); in omap3isp_h3a_af_init()
H A Disphist.c137 hist->buf_size = conf->buf_size; in hist_setup_regs()
194 cfg.src_maxburst = hist->buf_size / 4; in hist_buf_dma()
204 hist->buf_size, DMA_DEV_TO_MEM, in hist_buf_dma()
255 for (i = hist->buf_size / 16; i > 0; i--) { in hist_buf_pio()
308 u32 buf_size; in hist_validate_params() local
350 buf_size = hist_get_buf_size(user_cfg); in hist_validate_params()
351 if (buf_size > user_cfg->buf_size) in hist_validate_params()
353 user_cfg->buf_size = buf_size; in hist_validate_params()
354 else if (user_cfg->buf_size > OMAP3ISP_HIST_MAX_BUF_SIZE) in hist_validate_params()
355 user_cfg->buf_size = OMAP3ISP_HIST_MAX_BUF_SIZE; in hist_validate_params()
[all …]
/linux/include/linux/
H A Dtpm_svsm.h79 u32 buf_size; member
96 u32 buf_size; member
118 req->buf_size = len; in svsm_vtpm_cmd_request_fill()
138 if (len < resp->buf_size) in svsm_vtpm_cmd_response_parse()
141 if (resp->buf_size > SVSM_VTPM_MAX_BUFFER - sizeof(*resp)) in svsm_vtpm_cmd_response_parse()
144 memcpy(buf, resp->buf, resp->buf_size); in svsm_vtpm_cmd_response_parse()
146 return resp->buf_size; in svsm_vtpm_cmd_response_parse()
H A Dkernel_read_file.h40 void **buf, size_t buf_size,
44 void **buf, size_t buf_size,
48 void **buf, size_t buf_size,
52 void **buf, size_t buf_size,
/linux/drivers/media/pci/ivtv/
H A Divtv-queue.c15 if (s->buf_size - buf->bytesused < copybytes) in ivtv_buf_copy_from_user()
16 copybytes = s->buf_size - buf->bytesused; in ivtv_buf_copy_from_user()
54 q->length += s->buf_size; in ivtv_enqueue()
69 q->length -= s->buf_size; in ivtv_dequeue()
83 from->length -= s->buf_size; in ivtv_queue_move_buf()
89 to->length += s->buf_size; in ivtv_queue_move_buf()
144 steal->length -= s->buf_size; in ivtv_queue_move()
148 from->length += s->buf_size; in ivtv_queue_move()
149 bytes_available += s->buf_size; in ivtv_queue_move()
192 s->name, s->buffers, s->buf_size, s->buffers * s->buf_size / 1024); in ivtv_stream_alloc()
[all …]
/linux/drivers/media/pci/cx18/
H A Dcx18-queue.c93 u32 buf_size = s->buf_size; in _cx18_mdl_update_bufs_for_cpu() local
98 if (bytesused >= buf_size) { in _cx18_mdl_update_bufs_for_cpu()
99 buf->bytesused = buf_size; in _cx18_mdl_update_bufs_for_cpu()
100 bytesused -= buf_size; in _cx18_mdl_update_bufs_for_cpu()
294 cx18_writel(cx, s->buf_size, in cx18_load_queues()
306 partial_buf_size = s->mdl_size % s->buf_size; in cx18_load_queues()
323 u32 buf_size = s->buf_size; in _cx18_mdl_sync_for_device() local
329 buf_size, dma); in _cx18_mdl_sync_for_device()
341 s->name, s->buffers, s->buf_size, in cx18_stream_alloc()
342 s->buffers * s->buf_size / 1024, in cx18_stream_alloc()
[all …]
/linux/drivers/infiniband/sw/rxe/
H A Drxe_queue.c14 size_t buf_size, struct rxe_mmap_info **ip_p) in do_mmap_info() argument
20 ip = rxe_create_mmap_info(rxe, buf_size, udata, buf); in do_mmap_info()
52 memset(q->buf->data, 0, q->buf_size - sizeof(struct rxe_queue_buf)); in rxe_queue_reset()
59 size_t buf_size; in rxe_queue_init() local
87 buf_size = sizeof(struct rxe_queue_buf) + num_slots * elem_size; in rxe_queue_init()
89 q->buf = vmalloc_user(buf_size); in rxe_queue_init()
96 q->buf_size = buf_size; in rxe_queue_init()
163 new_q->buf_size, &new_q->ip); in rxe_queue_resize()
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dxdp_adjust_frags.c8 int err, prog_fd, max_skb_frags, buf_size, num; in test_xdp_update_frags() local
118 buf_size = 4096 + (max_skb_frags + 1) * sysconf(_SC_PAGE_SIZE); in test_xdp_update_frags()
119 buf = malloc(buf_size); in test_xdp_update_frags()
123 memset(buf, 0, buf_size); in test_xdp_update_frags()
131 topts.data_size_in = buf_size; in test_xdp_update_frags()
132 topts.data_size_out = buf_size; in test_xdp_update_frags()
/linux/drivers/input/
H A Dinput-compat.c100 int input_bits_to_string(char *buf, int buf_size, unsigned long bits, in input_bits_to_string() argument
108 len += snprintf(buf, buf_size, "%x ", dword); in input_bits_to_string()
112 len += snprintf(buf + len, max(buf_size - len, 0), in input_bits_to_string()
116 len += snprintf(buf, buf_size, "%lx", bits); in input_bits_to_string()
154 int input_bits_to_string(char *buf, int buf_size, unsigned long bits, in input_bits_to_string() argument
158 snprintf(buf, buf_size, "%lx", bits) : 0; in input_bits_to_string()
/linux/tools/testing/vsock/
H A Dvsock_test.c419 size_t buf_size; in test_seqpacket_msg_bounds_client() local
425 buf_size = page_size + in test_seqpacket_msg_bounds_client()
428 buf_size = 1 + (rand() % page_size); in test_seqpacket_msg_bounds_client()
430 buf = malloc(buf_size); in test_seqpacket_msg_bounds_client()
437 memset(buf, rand() & 0xff, buf_size); in test_seqpacket_msg_bounds_client()
446 send_buf(fd, buf, buf_size, flags, buf_size); in test_seqpacket_msg_bounds_client()
457 curr_hash += hash_djb2(buf, buf_size); in test_seqpacket_msg_bounds_client()
668 size_t buf_size; in test_seqpacket_bigmsg_client() local
690 buf_size = (size_t)sock_buf_size; in test_seqpacket_bigmsg_client()
691 if (buf_size != sock_buf_size) { in test_seqpacket_bigmsg_client()
[all …]
/linux/arch/s390/kernel/
H A Ddebug.c78 int nr_areas, int buf_size, umode_t mode);
310 int nr_areas, int buf_size, int level, in debug_info_alloc() argument
339 rc->buf_size = buf_size; in debug_info_alloc()
340 rc->entry_size = sizeof(debug_entry_t) + buf_size; in debug_info_alloc()
395 int nr_areas, int buf_size, umode_t mode) in debug_info_create() argument
401 rc = debug_info_alloc(name, pages_per_area, nr_areas, buf_size, level, ALL_AREAS); in debug_info_create()
424 in->nr_areas, in->buf_size, in->level, mode); in debug_info_copy()
822 char *buf, size_t buf_size, bool reverse) in debug_dump() argument
831 if (buf_size < 1) in debug_dump()
833 buf_size--; in debug_dump()
[all …]
/linux/lib/tests/
H A Dstring_kunit.c123 size_t buf_size; in string_test_strlen() local
126 buf_size = PAGE_ALIGN(STRING_TEST_MAX_LEN + STRING_TEST_MAX_OFFSET + 1); in string_test_strlen()
127 buf = vmalloc(buf_size); in string_test_strlen()
130 memset(buf, 'A', buf_size); in string_test_strlen()
134 s = buf + buf_size - 1 - offset - len; in string_test_strlen()
147 size_t buf_size; in string_test_strnlen() local
150 buf_size = PAGE_ALIGN(STRING_TEST_MAX_LEN + STRING_TEST_MAX_OFFSET + 1); in string_test_strnlen()
151 buf = vmalloc(buf_size); in string_test_strnlen()
154 memset(buf, 'A', buf_size); in string_test_strnlen()
158 s = buf + buf_size - 1 - offset - len; in string_test_strnlen()
[all …]
/linux/security/integrity/ima/
H A Dima_kexec.c41 size_t buf_size = 0; in ima_measure_kexec_event() local
45 buf_size = ima_get_binary_runtime_size(BINARY_FULL); in ima_measure_kexec_event()
51 kexec_segment_size, buf_size, len); in ima_measure_kexec_event()
228 size_t buf_size = 0; in ima_update_kexec_buffer()
242 ret = ima_dump_measurement_list(&buf_size, &buf, kexec_segment_size);
247 if (buf_size != 0) in ima_kexec_post_load()
248 memcpy(ima_kexec_buffer, buf, buf_size); in ima_kexec_post_load()
208 size_t buf_size = 0; ima_update_kexec_buffer() local
/linux/tools/perf/util/
H A Dsymbol-minimal.c112 ssize_t phdr_size, ehdr_size, buf_size = 0; in filename__read_build_id()
192 if (p_filesz > buf_size) { in filename__read_build_id()
195 buf_size = p_filesz; in filename__read_build_id()
196 tmp = realloc(buf, buf_size); in filename__read_build_id()
224 size_t buf_size; in sysfs__read_build_id()
234 buf_size = stbuf.st_size; in sysfs__read_build_id()
235 buf = malloc(buf_size); in sysfs__read_build_id()
239 if (read(fd, buf, buf_size) != (ssize_t) buf_size) in symsrc__init()
242 ret = read_build_id(buf, buf_size, bi in symsrc__init()
103 ssize_t phdr_size, ehdr_size, buf_size = 0; filename__read_build_id() local
212 size_t buf_size; sysfs__read_build_id() local
[all...]
/linux/drivers/media/usb/pvrusb2/
H A Dpvrusb2-debugifc.h16 char *buf_ptr, unsigned int buf_size);
22 char *buf_ptr,unsigned int buf_size);
26 const char *buf_ptr,unsigned int buf_size);
/linux/drivers/net/wireless/ath/wcn36xx/
H A Ddebug.c61 int buf_size; in write_file_bool_bmps() local
63 buf_size = min(count, (sizeof(buf)-1)); in write_file_bool_bmps()
64 if (copy_from_user(buf, user_buf, buf_size)) in write_file_bool_bmps()
105 int buf_size; in write_file_dump() local
112 buf_size = min(count, (sizeof(buf) - 1)); in write_file_dump()
113 if (copy_from_user(buf, user_buf, buf_size)) in write_file_dump()
/linux/tools/perf/tests/
H A Dapi-io.c59 size_t buf_size, struct io *io) in setup_test() argument
70 io->buf = malloc(buf_size); in setup_test()
77 io__init(io, io->fd, io->buf, buf_size); in setup_test()
88 static int do_test_get_char(const char *test_string, size_t buf_size) in do_test_get_char() argument
95 if (setup_test(path, test_string, buf_size, &io)) in do_test_get_char()
300 size_t buf_size = 128; in test_get_line() local
310 if (setup_test(path, test_string, buf_size, &io)) in test_get_line()
/linux/drivers/net/wireless/ti/wlcore/
H A Drx.c202 u32 buf_size; in wlcore_rx() local
220 buf_size = 0; in wlcore_rx()
227 if (buf_size + align_pkt_len > wl->aggr_buf_size) in wlcore_rx()
229 buf_size += align_pkt_len; in wlcore_rx()
234 if (buf_size == 0) { in wlcore_rx()
241 ret = wlcore_hw_prepare_read(wl, des, buf_size); in wlcore_rx()
246 buf_size, true); in wlcore_rx()
252 while (pkt_offset < buf_size) { in wlcore_rx()

12345678910>>...17