Home
last modified time | relevance | path

Searched refs:length (Results 1 – 25 of 80) sorted by relevance

1234

/tools/testing/selftests/vm/
Dmap_hugetlb.c49 static void write_bytes(char *addr, size_t length) in write_bytes() argument
53 for (i = 0; i < length; i++) in write_bytes()
57 static int read_bytes(char *addr, size_t length) in read_bytes() argument
62 for (i = 0; i < length; i++) in read_bytes()
75 size_t length = LENGTH; in main() local
81 if (hugepage_size > length) in main()
82 length = hugepage_size; in main()
85 length = atol(argv[1]) << 20; in main()
96 printf("Mapping %lu Mbytes\n", (unsigned long)length >> 20); in main()
98 addr = mmap(ADDR, length, PROTECTION, flags, -1, 0); in main()
[all …]
/tools/firewire/
Dnosy-dump.c33 static void print_packet(uint32_t *data, size_t length);
34 static void decode_link_packet(struct link_packet *packet, size_t length,
134 subaction_create(uint32_t *data, size_t length) in subaction_create() argument
139 sa = malloc(sizeof *sa - sizeof sa->packet + length); in subaction_create()
142 sa->ack = data[length / 4 - 1]; in subaction_create()
143 sa->length = length; in subaction_create()
144 memcpy(&sa->packet, data, length); in subaction_create()
230 decode_link_packet(&t->request->packet, t->request->length, in handle_transaction()
233 decode_link_packet(&t->response->packet, t->request->length, in handle_transaction()
240 print_packet((uint32_t *) &sa->packet, sa->length); in handle_transaction()
[all …]
/tools/lib/traceevent/
Dkbuffer-parse.c282 unsigned int length; in old_update_pointers() local
303 length = 0; in old_update_pointers()
314 length = len * 4; in old_update_pointers()
316 length = read_4(kbuf, ptr); in old_update_pointers()
317 length -= 4; in old_update_pointers()
325 kbuf->next = kbuf->index + length; in old_update_pointers()
346 unsigned long long *delta, int *length) in translate_data() argument
360 *length = read_4(kbuf, data); in translate_data()
369 *length = 0; in translate_data()
374 *length = 0; in translate_data()
[all …]
/tools/include/linux/
Djhash.h70 static inline u32 jhash(const void *key, u32 length, u32 initval) in jhash() argument
76 a = b = c = JHASH_INITVAL + length + initval; in jhash()
79 while (length > 12) { in jhash()
84 length -= 12; in jhash()
89 switch (length) { in jhash()
117 static inline u32 jhash2(const u32 *k, u32 length, u32 initval) in jhash2() argument
122 a = b = c = JHASH_INITVAL + (length<<2) + initval; in jhash2()
125 while (length > 3) { in jhash2()
130 length -= 3; in jhash2()
135 switch (length) { in jhash2()
/tools/perf/util/intel-pt-decoder/
Dintel-pt-insn-decoder.c39 intel_pt_insn->length = insn->length; in intel_pt_insn_decoder()
131 intel_pt_insn->length = insn->length; in intel_pt_insn_decoder()
164 if (!insn_complete(&insn) || insn.length > len) in intel_pt_get_insn()
167 if (insn.length < INTEL_PT_INSN_BUF_SZ) in intel_pt_get_insn()
168 memcpy(intel_pt_insn->buf, buf, insn.length); in intel_pt_get_insn()
191 if (!insn_complete(&insn) || insn.length > inlen) in dump_insn()
194 *lenp = insn.length; in dump_insn()
198 for (i = 0; i < insn.length; i++) { in dump_insn()
/tools/testing/selftests/ia64/
Daliasing-test.c24 static int map_mem(char *path, off_t offset, size_t length, int touch) in map_mem() argument
42 addr = mmap(NULL, length, PROT_READ|PROT_WRITE, MAP_SHARED, fd, offset); in map_mem()
48 while (c < (int *) (addr + length)) in map_mem()
52 rc = munmap(addr, length); in map_mem()
62 static int scan_tree(char *path, char *file, off_t offset, size_t length, int touch) in scan_tree() argument
89 rc = map_mem(path2, offset, length, touch); in scan_tree()
91 …fprintf(stderr, "PASS: %s 0x%lx-0x%lx is %s\n", path2, offset, offset + length, touch ? "readable"… in scan_tree()
93 fprintf(stderr, "PASS: %s 0x%lx-0x%lx not mappable\n", path2, offset, offset + length); in scan_tree()
95 fprintf(stderr, "FAIL: %s 0x%lx-0x%lx not accessible\n", path2, offset, offset + length); in scan_tree()
101 rc = scan_tree(path2, file, offset, length, touch); in scan_tree()
/tools/testing/nvdimm/test/
Dnfit.c292 u32 *status = (u32 *)&nd_cmd->data[nd_cmd->length]; in nd_intel_test_send_data()
303 dev_dbg(dev, "%s: cmd->data[%u]: %#x\n", __func__, nd_cmd->length-1, in nd_intel_test_send_data()
304 nd_cmd->data[nd_cmd->length-1]); in nd_intel_test_send_data()
323 if (nd_cmd->offset + nd_cmd->length > INTEL_FW_STORAGE_SIZE || in nd_intel_test_send_data()
324 nd_cmd->length > INTEL_FW_MAX_SEND_LEN) { in nd_intel_test_send_data()
330 fw->size_received += nd_cmd->length; in nd_intel_test_send_data()
332 __func__, nd_cmd->length, fw->size_received); in nd_intel_test_send_data()
540 ars_status->length = len; in post_ars_status()
545 u64 be_end = be->start + be->length - 1; in post_ars_status()
557 ars_record->length = rend - rstart + 1; in post_ars_status()
[all …]
/tools/usb/usbip/libsrc/
Dsysfs_utils.c14 int length; in write_sysfs_attribute() local
22 length = write(fd, new_value, len); in write_sysfs_attribute()
23 if (length < 0) { in write_sysfs_attribute()
Dusbip_host_common.c33 int length; in read_attr_usbip_status() local
52 length = read(fd, status, 1); in read_attr_usbip_status()
53 if (length < 0) { in read_attr_usbip_status()
/tools/perf/util/
Dstring.c26 s64 length; in perf_atoll() local
33 length = strtoll(str, &p, 10); in perf_atoll()
41 return length; in perf_atoll()
46 length <<= 10; in perf_atoll()
49 length <<= 20; in perf_atoll()
52 length <<= 30; in perf_atoll()
55 length <<= 40; in perf_atoll()
66 return length; in perf_atoll()
Dsymbol_fprintf.c25 size_t length; in __symbol__fprintf_symname_offs() local
28 length = fprintf(fp, "%s", sym->name); in __symbol__fprintf_symname_offs()
34 length += fprintf(fp, "+0x%lx", offset); in __symbol__fprintf_symname_offs()
36 return length; in __symbol__fprintf_symname_offs()
/tools/power/acpi/os_specific/service_layers/
Dosunixmap.c63 void *acpi_os_map_memory(acpi_physical_address where, acpi_size length) in acpi_os_map_memory() argument
83 mapped_memory = mmap(NULL, (length + offset), PROT_READ, MMAP_FLAGS, in acpi_os_map_memory()
109 void acpi_os_unmap_memory(void *where, acpi_size length) in acpi_os_unmap_memory() argument
116 munmap((u8 *)where - offset, (length + offset)); in acpi_os_unmap_memory()
Doslinuxtbl.c701 (u8)((gbl_xsdt->header.length - in osl_list_bios_tables()
710 (u8)((gbl_rsdt->header.length - in osl_list_bios_tables()
802 if ((gbl_fadt->header.length >= in osl_get_bios_table()
809 if ((gbl_fadt->header.length >= in osl_get_bios_table()
820 if ((gbl_fadt->header.length >= in osl_get_bios_table()
827 if ((gbl_fadt->header.length >= in osl_get_bios_table()
891 (u8)((gbl_xsdt->header.length - in osl_get_bios_table()
901 (u8)((gbl_rsdt->header.length - in osl_get_bios_table()
930 table_length = mapped_table->length; in osl_get_bios_table()
1058 u32 length; in osl_map_table() local
[all …]
/tools/testing/selftests/timers/
Dnanosleep.c133 long long length; in main() local
147 length = 10; in main()
148 while (length <= (NSEC_PER_SEC * 10)) { in main()
149 ret = nanosleep_test(clockid, length); in main()
158 length *= 100; in main()
Dnsleep-lat.c146 long long length; in main() local
160 length = 10; in main()
161 while (length <= (NSEC_PER_SEC * 10)) { in main()
162 ret = nanosleep_lat_test(clockid, length); in main()
165 length *= 100; in main()
/tools/testing/selftests/bpf/progs/
Dtest_jhash.h36 u32 jhash(const void *key, u32 length, u32 initval) in jhash() argument
41 a = b = c = JHASH_INITVAL + length + initval; in jhash()
43 while (length > 12) { in jhash()
48 length -= 12; in jhash()
51 switch (length) { in jhash()
/tools/lib/traceevent/plugins/
Dplugin_mac80211.c34 int length; in print_string() local
42 length = f->size; in print_string()
51 length = v >> 16; in print_string()
54 trace_seq_printf(s, "%.*s", length, (char *)data + offset); in print_string()
/tools/testing/selftests/net/
Dtcp_mmap.c96 void hash_zone(void *zone, unsigned int length) in hash_zone() argument
100 while (length >= 8*sizeof(long)) { in hash_zone()
111 length -= 8*sizeof(long); in hash_zone()
113 while (length >= 1) { in hash_zone()
116 length--; in hash_zone()
159 zc.length = chunk_size; in child_thread()
166 if (zc.length) { in child_thread()
167 assert(zc.length <= chunk_size); in child_thread()
168 total_mmap += zc.length; in child_thread()
170 hash_zone(addr, zc.length); in child_thread()
[all …]
/tools/power/acpi/tools/acpidump/
Dapdump.c46 if (table->length < sizeof(struct acpi_table_header)) { in ap_is_valid_header()
48 table->length); in ap_is_valid_header()
81 status = acpi_tb_verify_checksum(table, table->length); in ap_is_valid_checksum()
121 return (table->length); in ap_get_table_length()
384 if (table->length > file_size) { in ap_dump_table_from_file()
387 table->length, file_size, pathname); in ap_dump_table_from_file()
Dapfiles.c142 table->signature, filename, table->length, in ap_write_to_binary_file()
143 table->length); in ap_write_to_binary_file()
/tools/usb/
Dffs-test.c132 .length = cpu_to_le32(sizeof descriptors),
227 __u32 length, fs_count = 0, hs_count = 0, count; in descs_to_legacy() local
241 length = le32_to_cpu(in->header.length); in descs_to_legacy()
242 if (length <= sizeof in->header) in descs_to_legacy()
244 length -= sizeof in->header; in descs_to_legacy()
253 if (length < 4) \ in descs_to_legacy()
256 length -= 4; \ in descs_to_legacy()
278 if (length < *descs_end) in descs_to_legacy()
280 length -= *descs_end; in descs_to_legacy()
294 length = sizeof out->header + (descs_end - descs_start); in descs_to_legacy()
[all …]
/tools/perf/arch/x86/util/
Darchinsn.c24 if (insn_complete(&insn) && insn.length <= len) in arch_fetch_insn()
25 sample->insn_len = insn.length; in arch_fetch_insn()
/tools/testing/selftests/rcutorture/formal/srcu-cbmc/
Dmodify_srcu.awk144 if (RSTART + RLENGTH <= length()) function
173 if (RSTART + RLENGTH <= length()) function
239 end_loc = length(old_record) - length($0);
240 end_loc += index(last_fs, ",") - length(last_fs);
/tools/virtio/linux/
Dscatterlist.h10 unsigned int length; member
64 sg->length = len; in sg_set_page()
98 prv[prv_nents - 1].length = 0; in sg_chain()
/tools/spi/
Dspidev_test.c57 static void hex_dump(const void *src, size_t length, size_t line_size, in hex_dump() argument
66 while (length-- > 0) { in hex_dump()
68 if (!(++i % line_size) || (length == 0 && i % line_size)) { in hex_dump()
69 if (length == 0) { in hex_dump()
79 if (length > 0) in hex_dump()

1234