Home
last modified time | relevance | path

Searched refs:buffer (Results 1 – 25 of 154) sorted by relevance

1234567

/tools/testing/selftests/mm/
A Dhmm-tests.c211 munmap(buffer->ptr, buffer->size); in hmm_buffer_free()
306 buffer = malloc(sizeof(*buffer)); in TEST_F()
369 buffer = malloc(sizeof(*buffer)); in TEST_F()
428 buffer = malloc(sizeof(*buffer)); in TEST_F()
476 buffer = malloc(sizeof(*buffer)); in TEST_F()
544 buffer = malloc(sizeof(*buffer)); in TEST_F()
622 buffer = malloc(sizeof(*buffer)); in TEST_F()
697 buffer = malloc(sizeof(*buffer)); in TEST_F()
806 buffer = malloc(sizeof(*buffer)); in TEST_F()
863 buffer = malloc(sizeof(*buffer)); in TEST_F()
[all …]
A Dhugetlb_dio.c26 char *buffer = NULL; in run_dio_using_hugetlb() local
60 buffer = orig_buffer; in run_dio_using_hugetlb()
61 buffer += start_off; in run_dio_using_hugetlb()
63 memset(buffer, 'A', writesize); in run_dio_using_hugetlb()
66 if (write(fd, buffer, writesize) != (writesize)) { in run_dio_using_hugetlb()
/tools/wmi/
A Ddell-smbios-example.c35 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()
138 buffer->std.input[1] = 1; in activate_token()
168 buffer = malloc(value); in main()
169 if (buffer == NULL) { in main()
174 buffer->length = value; in main()
186 show_buffer(buffer); in main()
[all …]
/tools/testing/selftests/kvm/x86/
A Duserspace_io_test.c13 static void guest_ins_port80(uint8_t *buffer, unsigned int count) in guest_ins_port80() argument
18 end = (unsigned long)buffer + 1; in guest_ins_port80()
20 end = (unsigned long)buffer + 8192; in guest_ins_port80()
24 GUEST_ASSERT_EQ((unsigned long)buffer, end); in guest_ins_port80()
29 uint8_t buffer[8192]; in guest_code() local
39 guest_ins_port80(buffer, 2); in guest_code()
40 guest_ins_port80(buffer, 3); in guest_code()
43 memset(buffer, 0, sizeof(buffer)); in guest_code()
44 guest_ins_port80(buffer, 8192); in guest_code()
46 __GUEST_ASSERT(buffer[i] == 0xaa, in guest_code()
[all …]
/tools/testing/selftests/powerpc/
A Dutils.c72 char *buffer = NULL; in read_file_alloc() local
112 *buf = buffer; in read_file_alloc()
121 free(buffer); in read_file_alloc()
311 err = read_file(path, buffer, sizeof(buffer) - 1, NULL); in read_long()
315 return parse_long(buffer, sizeof(buffer), result, base); in read_long()
323 err = read_file(path, buffer, sizeof(buffer) - 1, NULL); in read_ulong()
327 return parse_ulong(buffer, sizeof(buffer), result, base); in read_ulong()
334 char buffer[32]; in write_long() local
342 len = snprintf(buffer, sizeof(buffer), "%ld", result); in write_long()
359 char buffer[32]; in write_ulong() local
[all …]
/tools/testing/selftests/powerpc/cache_shape/
A Dcache_shape.c53 static char buffer[4096]; in test_cache_shape() local
57 FAIL_IF(read_auxv(buffer, sizeof(buffer))); in test_cache_shape()
61 p = find_auxv_entry(AT_L1I_CACHESIZE, buffer); in test_cache_shape()
67 p = find_auxv_entry(AT_L1I_CACHEGEOMETRY, buffer); in test_cache_shape()
73 p = find_auxv_entry(AT_L1D_CACHESIZE, buffer); in test_cache_shape()
79 p = find_auxv_entry(AT_L1D_CACHEGEOMETRY, buffer); in test_cache_shape()
85 p = find_auxv_entry(AT_L2_CACHESIZE, buffer); in test_cache_shape()
91 p = find_auxv_entry(AT_L2_CACHEGEOMETRY, buffer); in test_cache_shape()
97 p = find_auxv_entry(AT_L3_CACHESIZE, buffer); in test_cache_shape()
103 p = find_auxv_entry(AT_L3_CACHEGEOMETRY, buffer); in test_cache_shape()
/tools/testing/selftests/pidfd/
A Dpidfd_open_test.c48 static int char_left_gc(const char *buffer, size_t len) in char_left_gc() argument
53 if (buffer[i] == ' ' || in char_left_gc()
54 buffer[i] == '\t') in char_left_gc()
68 if (buffer[i] == ' ' || in char_right_gc()
69 buffer[i] == '\t' || in char_right_gc()
70 buffer[i] == '\n' || in char_right_gc()
71 buffer[i] == '\0') in char_right_gc()
80 static char *trim_whitespace_in_place(char *buffer) in trim_whitespace_in_place() argument
82 buffer += char_left_gc(buffer, strlen(buffer)); in trim_whitespace_in_place()
83 buffer[char_right_gc(buffer, strlen(buffer))] = '\0'; in trim_whitespace_in_place()
[all …]
/tools/testing/selftests/drivers/net/mlxsw/
A Dqos_headroom.sh251 dcb buffer set dev $swp prio-buffer 0:1 1:3 2:5 3:7 4:0 5:2 6:4 7:6
259 dcb buffer set dev $swp prio-buffer all:0
273 dcb buffer set dev $swp buffer-size all:0 0:$size 2>/dev/null
278 dcb buffer set dev $swp buffer-size all:0 0:$size
286 dcb buffer set dev $swp buffer-size all:0
292 dcb buffer set dev $swp buffer-size all:0 0:$size
295 dcb buffer set dev $swp buffer-size all:0
300 dcb buffer set dev $swp buffer-size all:0 0:$size
305 dcb buffer set dev $swp buffer-size all:0 0:$size 2>/dev/null
366 dcb buffer set dev $swp buffer-size all:0 0:$size
[all …]
A Dqos_pfc.sh175 dcb buffer set dev $swp1 prio-buffer all:0 1:1
213 dcb buffer set dev $swp3 prio-buffer all:0 1:1
230 dcb buffer set dev $swp4 prio-buffer all:0 1:1
247 dcb buffer set dev $swp4 buffer-size all:0 1:$pg1_size
290 dcb buffer set dev $swp4 buffer-size all:0
292 dcb buffer set dev $swp4 prio-buffer all:0
306 dcb buffer set dev $swp3 prio-buffer all:0
332 dcb buffer set dev $swp1 prio-buffer all:0
/tools/testing/selftests/bpf/progs/
A Dtest_parse_tcp_hdr_opt_dynptr.c34 __u8 buffer[sizeof(kind) + sizeof(hdr_len) + sizeof(*server_id)]; in parse_hdr_opt() local
37 __builtin_memset(buffer, 0, sizeof(buffer)); in parse_hdr_opt()
39 data = bpf_dynptr_slice(ptr, *off, buffer, sizeof(buffer)); in parse_hdr_opt()
77 __u8 buffer[sizeof(struct tcphdr)] = {}; in xdp_ingress_v6() local
90 tcp_hdr = bpf_dynptr_slice(&ptr, off, buffer, sizeof(buffer)); in xdp_ingress_v6()
A Ddynptr_fail.c262 hdr = bpf_dynptr_slice_rdwr(&ptr, 0, buffer, sizeof(buffer)); in data_slice_out_of_bounds_skb()
1082 hdr = bpf_dynptr_slice(&ptr, 0, buffer, sizeof(buffer)); in skb_invalid_slice_write()
1103 hdr = bpf_dynptr_slice(&ptr, 0, buffer, sizeof(buffer)); in skb_invalid_data_slice1()
1129 hdr = bpf_dynptr_slice_rdwr(&ptr, 0, buffer, sizeof(buffer)); in skb_invalid_data_slice2()
1156 hdr = bpf_dynptr_slice(&ptr, 0, buffer, sizeof(buffer)); in skb_invalid_data_slice3()
1181 hdr = bpf_dynptr_slice_rdwr(&ptr, 0, buffer, sizeof(buffer)); in skb_invalid_data_slice4()
1205 hdr = bpf_dynptr_slice(&ptr, 0, buffer, sizeof(buffer)); in xdp_invalid_data_slice1()
1230 hdr = bpf_dynptr_slice_rdwr(&ptr, 0, buffer, sizeof(buffer)); in xdp_invalid_data_slice2()
1402 hdr = bpf_dynptr_slice_rdwr(&ptr, 0, buffer, sizeof(buffer)); in invalid_slice_rdwr_rdonly()
1655 data = bpf_dynptr_slice_rdwr(&clone, 0, buffer, sizeof(buffer)); in clone_skb_packet_data()
[all …]
A Dtest_l4lb_noinline_dynptr.c242 icmp_hdr = bpf_dynptr_slice(skb_ptr, off, buffer, sizeof(buffer)); in parse_icmpv6()
249 ip6h = bpf_dynptr_slice(skb_ptr, off, buffer, sizeof(buffer)); in parse_icmpv6()
287 __u8 buffer[sizeof(struct udphdr)] = {}; in parse_udp() local
290 udp = bpf_dynptr_slice(skb_ptr, off, buffer, sizeof(buffer)); in parse_udp()
307 __u8 buffer[sizeof(struct tcphdr)] = {}; in parse_tcp() local
310 tcp = bpf_dynptr_slice(skb_ptr, off, buffer, sizeof(buffer)); in parse_tcp()
354 ip6h = bpf_dynptr_slice(skb_ptr, off, buffer, sizeof(buffer)); in process_packet()
377 iph = bpf_dynptr_slice(skb_ptr, off, buffer, sizeof(buffer)); in process_packet()
470 eth = bpf_dynptr_slice_rdwr(&ptr, 0, buffer, sizeof(buffer)); in balancer_ingress()
481 if (eth == buffer) in balancer_ingress()
[all …]
/tools/testing/selftests/net/
A Dtcp_mmap.c136 void *buffer; in mmap_large_buffer() local
144 if (buffer == (void *)-1) { in mmap_large_buffer()
149 if (buffer != (void *)-1) in mmap_large_buffer()
153 return buffer; in mmap_large_buffer()
174 unsigned char *buffer = NULL; in child_thread() local
192 if (buffer == (void *)-1) { in child_thread()
252 hash_zone(buffer, lu); in child_thread()
287 if (memcmp(digest, buffer, in child_thread()
316 munmap(buffer, buffer_sz); in child_thread()
449 unsigned char *buffer; in main() local
[all …]
A Dfin_ack_lat.c35 int buffer; in client() local
64 send(sock, &buffer, sizeof(buffer), 0); in client()
65 if (read(sock, &buffer, sizeof(buffer)) == -1) in client()
90 int buffer; in server() local
98 if (read(accepted, &buffer, sizeof(buffer)) == -1) in server()
/tools/perf/util/
A Ds390-cpumsf.c712 sfq->buffer = buffer = auxtrace_buffer__next(queue, in s390_cpumsf_run_decoder()
714 if (!buffer) { in s390_cpumsf_run_decoder()
720 buffer->use_size = buffer->size; in s390_cpumsf_run_decoder()
721 buffer->use_data = buffer->data; in s390_cpumsf_run_decoder()
724 size_t rc = fwrite(buffer->data, buffer->size, 1, in s390_cpumsf_run_decoder()
730 buffer = sfq->buffer; in s390_cpumsf_run_decoder()
735 buffer->data = auxtrace_buffer__get_data(buffer, fd); in s390_cpumsf_run_decoder()
738 buffer->use_size = buffer->size; in s390_cpumsf_run_decoder()
739 buffer->use_data = buffer->data; in s390_cpumsf_run_decoder()
742 size_t rc = fwrite(buffer->data, buffer->size, 1, in s390_cpumsf_run_decoder()
[all …]
A Dordered-events.c143 } else if (oe->buffer) { in alloc_event()
144 new = &oe->buffer->event[oe->buffer_idx]; in alloc_event()
146 oe->buffer = NULL; in alloc_event()
148 oe->buffer = malloc(size); in alloc_event()
149 if (!oe->buffer) { in alloc_event()
158 list_add(&oe->buffer->list, &oe->to_free); in alloc_event()
161 new = &oe->buffer->event[0]; in alloc_event()
384 free(buffer); in ordered_events_buffer__free()
398 if (oe->buffer) { in ordered_events__free()
399 list_del_init(&oe->buffer->list); in ordered_events__free()
[all …]
A Dintel-bts.c193 if (!btsq->buffer) in intel_bts_setup_queue()
417 if (buffer->use_data) { in intel_bts_process_buffer()
421 sz = buffer->size; in intel_bts_process_buffer()
449 struct auxtrace_buffer *buffer = btsq->buffer, *old_buffer = buffer; in intel_bts_process_queue() local
469 if (!buffer) in intel_bts_process_queue()
472 if (!buffer) { in intel_bts_process_queue()
485 if (!buffer->data) { in intel_bts_process_queue()
488 buffer->data = auxtrace_buffer__get_data(buffer, fd); in intel_bts_process_queue()
489 if (!buffer->data) { in intel_bts_process_queue()
511 btsq->buffer = auxtrace_buffer__next(queue, buffer); in intel_bts_process_queue()
[all …]
/tools/include/nolibc/
A Dstdlib.h211 buffer[digits++] = '0' + dig; in utoh_r()
215 buffer[digits] = 0; in utoh_r()
252 buffer[digits++] = '0' + dig; in utoa_r()
256 buffer[digits] = 0; in utoa_r()
269 char *ptr = buffer; in itoa_r()
287 itoa_r(in, buffer); in ltoa_r()
288 return buffer; in ltoa_r()
348 buffer[digits++] = '0' + dig; in u64toh_r()
351 buffer[digits] = 0; in u64toh_r()
392 buffer[digits] = 0; in u64toa_r()
[all …]
/tools/testing/selftests/rseq/
A Dparam_test.c934 memset(&buffer, 0, sizeof(buffer)); in test_percpu_buffer()
942 buffer.c[i].array = in test_percpu_buffer()
945 assert(buffer.c[i].array); in test_percpu_buffer()
963 buffer.c[i].offset++; in test_percpu_buffer()
996 free(buffer.c[i].array); in test_percpu_buffer()
1145 memset(&buffer, 0, sizeof(buffer)); in test_percpu_memcpy_buffer()
1153 buffer.c[i].array = in test_percpu_memcpy_buffer()
1156 assert(buffer.c[i].array); in test_percpu_memcpy_buffer()
1170 buffer.c[i].offset++; in test_percpu_memcpy_buffer()
1177 &buffer); in test_percpu_memcpy_buffer()
[all …]
/tools/power/acpi/tools/acpidump/
A Dapfiles.c182 struct acpi_table_header *buffer = NULL; in ap_get_table_from_file() local
206 buffer = ACPI_ALLOCATE_ZEROED(file_size); in ap_get_table_from_file()
207 if (!buffer) { in ap_get_table_from_file()
216 actual = fread(buffer, 1, file_size, file); in ap_get_table_from_file()
219 ACPI_FREE(buffer); in ap_get_table_from_file()
220 buffer = NULL; in ap_get_table_from_file()
228 return (buffer); in ap_get_table_from_file()
/tools/perf/arch/powerpc/util/
A Dheader.c27 get_cpuid(char *buffer, size_t sz, struct perf_cpu cpu __maybe_unused) in get_cpuid() argument
34 nb = scnprintf(buffer, sz, "%lu,%lu$", PVR_VER(pvr), PVR_REV(pvr)); in get_cpuid()
37 if (strchr(buffer, '$')) { in get_cpuid()
38 buffer[nb-1] = '\0'; in get_cpuid()
/tools/hv/
A Dhv_vss_daemon.c66 char *buffer; in is_dev_loop() local
71 buffer = malloc(PATH_MAX); in is_dev_loop()
72 if (!buffer) { in is_dev_loop()
77 snprintf(buffer, PATH_MAX, "%s/loop", blkname); in is_dev_loop()
78 if (!access(buffer, R_OK | X_OK)) { in is_dev_loop()
83 buffer, errno, strerror(errno)); in is_dev_loop()
86 snprintf(buffer, PATH_MAX, "%s/slaves", blkname); in is_dev_loop()
87 dir = opendir(buffer); in is_dev_loop()
91 buffer, errno, strerror(errno)); in is_dev_loop()
102 if (is_dev_loop(buffer)) { in is_dev_loop()
[all …]
/tools/perf/arch/x86/util/
A Dheader.c26 __get_cpuid(char *buffer, size_t sz, const char *fmt) in __get_cpuid() argument
50 nb = scnprintf(buffer, sz, fmt, vendor, family, model, step); in __get_cpuid()
53 if (strchr(buffer, '$')) { in __get_cpuid()
54 buffer[nb-1] = '\0'; in __get_cpuid()
61 get_cpuid(char *buffer, size_t sz, struct perf_cpu cpu __maybe_unused) in get_cpuid() argument
63 return __get_cpuid(buffer, sz, "%s,%u,%u,%u$"); in get_cpuid()
A Dauxtrace.c57 char buffer[64]; in auxtrace_record__init() local
63 ret = get_cpuid(buffer, sizeof(buffer), cpu); in auxtrace_record__init()
69 if (!strncmp(buffer, "GenuineIntel,", 13)) in auxtrace_record__init()
/tools/testing/selftests/net/af_unix/
A Dscm_pidfd.c60 static int char_left_gc(const char *buffer, size_t len) in char_left_gc() argument
65 if (buffer[i] == ' ' || buffer[i] == '\t') in char_left_gc()
74 static int char_right_gc(const char *buffer, size_t len) in char_right_gc() argument
79 if (buffer[i] == ' ' || buffer[i] == '\t' || in char_right_gc()
80 buffer[i] == '\n' || buffer[i] == '\0') in char_right_gc()
89 static char *trim_whitespace_in_place(char *buffer) in trim_whitespace_in_place() argument
91 buffer += char_left_gc(buffer, strlen(buffer)); in trim_whitespace_in_place()
92 buffer[char_right_gc(buffer, strlen(buffer))] = '\0'; in trim_whitespace_in_place()
93 return buffer; in trim_whitespace_in_place()

Completed in 61 milliseconds

1234567