| /tools/testing/selftests/mm/ |
| A D | map_hugetlb.c | 24 static void write_bytes(char *addr, size_t length) in write_bytes() argument 28 for (i = 0; i < length; i++) in write_bytes() 32 static void read_bytes(char *addr, size_t length) in read_bytes() argument 37 for (i = 0; i < length; i++) in read_bytes() 48 size_t length = LENGTH; in main() local 54 if (hugepage_size > length) in main() 55 length = hugepage_size; in main() 61 length = atol(argv[1]) << 20; in main() 80 write_bytes(addr, length); in main() 81 read_bytes(addr, length); in main() [all …]
|
| A D | hugepage-mremap.c | 101 size_t length = 0; in main() local 114 length = (size_t)atoi(argv[1]); in main() 116 length = DEFAULT_LENGTH_MB; in main() 118 length = MB_TO_BYTES(length); in main() 125 void *haddr = mmap((void *)suggested_addr, length, PROTECTION, in main() 146 register_region_with_uffd(haddr, length); in main() 148 void *addr = mremap(haddr, length, length, in main() 155 write_bytes(addr, length); in main() 156 ret = read_bytes(addr, length); in main() 158 munmap(addr, length); in main() [all …]
|
| /tools/include/nolibc/sys/ |
| A D | mman.h | 18 void *sys_mmap(void *addr, size_t length, int prot, int flags, int fd, in sys_mmap() argument 30 return (void *)my_syscall6(n, addr, length, prot, flags, fd, offset); in sys_mmap() 40 void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset) in mmap() argument 42 void *ret = sys_mmap(addr, length, prot, flags, fd, offset); in mmap() 71 int sys_munmap(void *addr, size_t length) in sys_munmap() argument 73 return my_syscall2(__NR_munmap, addr, length); in sys_munmap() 77 int munmap(void *addr, size_t length) in munmap() argument 79 return __sysret(sys_munmap(addr, length)); in munmap()
|
| /tools/firewire/ |
| A D | nosy-dump.c | 143 sa->length = length; in subaction_create() 621 if (length == 0) { in handle_packet() 669 if (length > 128) in dump_data() 672 print_length = length; in dump_data() 679 if (print_length < length) in dump_data() 750 if (length == 4) { in print_packet() 835 if (length == 0) in print_stats() 899 int length, retval, view; in main() local 975 if (fread(&length, sizeof length, 1, input) != 1) in main() 997 fwrite(&length, sizeof length, 1, output); in main() [all …]
|
| /tools/testing/selftests/bpf/progs/ |
| A D | test_jhash.h | 36 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() 73 static __always_inline u32 jhash2(const u32 *k, u32 length, u32 initval) in jhash2() argument 78 a = b = c = JHASH_INITVAL + (length<<2) + initval; in jhash2() 81 while (length > 3) { in jhash2() 86 length -= 3; in jhash2() 91 switch (length) { in jhash2()
|
| A D | loop6.c | 32 unsigned int length; member 83 bpf_probe_read_kernel(&len, sizeof(len), &sgp->length); in BPF_KPROBE() 93 bpf_probe_read_kernel(&len, sizeof(len), &sgp->length); in BPF_KPROBE()
|
| /tools/include/linux/ |
| A D | jhash.h | 70 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/ |
| A D | intel-pt-insn-decoder.c | 38 intel_pt_insn->length = insn->length; in intel_pt_insn_decoder() 97 intel_pt_insn->length = insn->length; in intel_pt_insn_decoder() 164 intel_pt_insn->length = insn->length; in intel_pt_insn_decoder() 198 if (ret < 0 || insn.length > len) in intel_pt_get_insn() 202 if (insn.length < INTEL_PT_INSN_BUF_SZ) in intel_pt_get_insn() 203 memcpy(intel_pt_insn->buf, buf, insn.length); in intel_pt_get_insn() 228 if (ret < 0 || insn.length > inlen) in dump_insn() 231 *lenp = insn.length; in dump_insn() 235 for (i = 0; i < insn.length; i++) { in dump_insn()
|
| /tools/testing/selftests/iommu/ |
| A D | iommufd_utils.h | 71 if (ftruncate(mfd, length)) in memfd_mmap() 401 .length = length, in _test_cmd_get_dirty_bitmap() 428 .length = length, in _test_cmd_mock_domain_set_dirty() 588 .length = length, in _test_ioctl_ioas_map() 653 size_t length, uint64_t *out_len) in _test_ioctl_ioas_unmap() argument 659 .length = length, in _test_ioctl_ioas_unmap() 665 *out_len = cmd.length; in _test_ioctl_ioas_unmap() 670 length, NULL)) 678 iova, length, NULL)) 690 .length = length, in _test_ioctl_ioas_map_file() [all …]
|
| /tools/testing/nvdimm/test/ |
| A D | nfit.c | 542 ars_status->length = len; in post_ars_status() 584 ars_start->length); in nfit_test_cmd_ars_start() 2015 spa->length = SPA0_SIZE; in nfit_test0_setup() 2029 spa->length = SPA1_SIZE; in nfit_test0_setup() 2039 spa->length = DCR_SIZE; in nfit_test0_setup() 2049 spa->length = DCR_SIZE; in nfit_test0_setup() 2059 spa->length = DCR_SIZE; in nfit_test0_setup() 2069 spa->length = DCR_SIZE; in nfit_test0_setup() 3021 .length = test_val, in nfit_ctl_test() 3043 .length = test_val, in nfit_ctl_test() [all …]
|
| /tools/testing/selftests/ia64/ |
| A D | aliasing-test.c | 24 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/usb/usbip/libsrc/ |
| A D | sysfs_utils.c | 14 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()
|
| /tools/power/acpi/os_specific/service_layers/ |
| A D | osunixmap.c | 63 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()
|
| /tools/testing/selftests/timers/ |
| A D | nanosleep.c | 121 long long length; in main() local 140 length = 10; in main() 141 while (length <= (NSEC_PER_SEC * 10)) { in main() 142 ret = nanosleep_test(clockid, length); in main() 151 length *= 100; in main()
|
| A D | nsleep-lat.c | 133 long long length; in main() local 148 length = 10; in main() 149 while (length <= (NSEC_PER_SEC * 10)) { in main() 150 ret = nanosleep_lat_test(clockid, length); in main() 153 length *= 100; in main()
|
| /tools/testing/selftests/arm64/fp/ |
| A D | README | 7 sve-probe-vls - Checks the SVE vector length enumeration interface 28 Vector length: 512 bits 31 Vector length: 512 bits 34 Vector length: 512 bits 37 Vector length: 512 bits 40 Vector length: 512 bits 43 Vector length: 512 bits 46 Vector length: 512 bits 49 Vector length: 512 bits 52 Vector length: 512 bits
|
| /tools/perf/util/ |
| A D | symbol_fprintf.c | 25 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()
|
| A D | string.c | 25 s64 length; in perf_atoll() local 32 length = strtoll(str, &p, 10); in perf_atoll() 40 return length; in perf_atoll() 45 length <<= 10; in perf_atoll() 48 length <<= 20; in perf_atoll() 51 length <<= 30; in perf_atoll() 54 length <<= 40; in perf_atoll() 65 return length; in perf_atoll()
|
| A D | arm64-frame-pointer-unwind-support.c | 15 size_t length; member 33 entries->stack[entries->length++] = entry->ip; in add_entry() 66 if (ret || entries.length != 2) in get_leaf_frame_caller_aarch64()
|
| /tools/power/acpi/tools/acpidump/ |
| A D | apdump.c | 46 if (table->length < sizeof(struct acpi_table_header)) { in ap_is_valid_header() 48 table->length); in ap_is_valid_header() 83 status = acpi_ut_verify_checksum(table, table->length); in ap_is_valid_checksum() 123 return (table->length); in ap_get_table_length() 386 if (table->length > file_size) { in ap_dump_table_from_file() 389 table->length, file_size, pathname); in ap_dump_table_from_file()
|
| /tools/usb/ |
| A D | ffs-test.c | 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() 295 out = malloc(length); in descs_to_legacy() 297 out->header.length = cpu_to_le32(length); in descs_to_legacy() 304 return length; in descs_to_legacy() [all …]
|
| /tools/testing/selftests/net/ |
| A D | tcp_mmap.c | 109 while (length >= 8*sizeof(long)) { in hash_zone() 120 length -= 8*sizeof(long); in hash_zone() 122 while (length >= 1) { in hash_zone() 125 length--; in hash_zone() 231 if (zc.length) { in child_thread() 232 assert(zc.length <= chunk_size); in child_thread() 234 EVP_DigestUpdate(ctx, addr, zc.length); in child_thread() 235 total_mmap += zc.length; in child_thread() 237 hash_zone(addr, zc.length); in child_thread() 241 madvise(addr, zc.length, MADV_DONTNEED); in child_thread() [all …]
|
| /tools/perf/arch/x86/util/ |
| A D | archinsn.c | 25 if (ret >= 0 && insn.length <= len) in arch_fetch_insn() 26 sample->insn_len = insn.length; in arch_fetch_insn()
|
| /tools/virtio/linux/ |
| A D | scatterlist.h | 10 unsigned int length; member 64 sg->length = len; in sg_set_page() 98 prv[prv_nents - 1].length = 0; in sg_chain()
|
| /tools/testing/selftests/net/netfilter/packetdrill/ |
| A D | conntrack_synack_old.pkt | 4 …seq 2375731741, win 29200, options [mss 1460,sackOK,TS val 2083107423 ecr 0,nop,wscale 7], length 0 6 …0523, win 65535, options [mss 8952,nop,wscale 5,TS val 3215437785 ecr 2082921663,nop,nop], length 0 8 …ck 1, win 65535, options [mss 8952,nop,wscale 5,TS val 3215443451 ecr 2082921663,nop,nop], length 0 10 …seq 2375731741, win 29200, options [mss 1460,sackOK,TS val 2083115583 ecr 0,nop,wscale 7], length 0 13 …1742, win 65535, options [mss 8952,nop,wscale 5,TS val 3215445754 ecr 2083115583,nop,nop], length 0
|