/tools/lib/ |
D | hweight.c | 20 unsigned int res = w - ((w >> 1) & 0x55555555); in __sw_hweight32() 21 res = (res & 0x33333333) + ((res >> 2) & 0x33333333); in __sw_hweight32() 22 res = (res + (res >> 4)) & 0x0F0F0F0F; in __sw_hweight32() 23 res = res + (res >> 8); in __sw_hweight32() 24 return (res + (res >> 16)) & 0x000000FF; in __sw_hweight32() 30 unsigned int res = w - ((w >> 1) & 0x5555); in __sw_hweight16() local 31 res = (res & 0x3333) + ((res >> 2) & 0x3333); in __sw_hweight16() 32 res = (res + (res >> 4)) & 0x0F0F; in __sw_hweight16() 33 return (res + (res >> 8)) & 0x00FF; in __sw_hweight16() 38 unsigned int res = w - ((w >> 1) & 0x55); in __sw_hweight8() local [all …]
|
D | string.c | 48 int strtobool(const char *s, bool *res) in strtobool() argument 57 *res = true; in strtobool() 62 *res = false; in strtobool() 69 *res = true; in strtobool() 73 *res = false; in strtobool()
|
/tools/bpf/bpftool/ |
D | feature.c | 64 const char *define_name, bool res, const char *define_prefix) in print_bool_feature() argument 67 jsonw_bool_field(json_wtr, feat_name, res); in print_bool_feature() 70 res ? "" : "NO_", define_name); in print_bool_feature() 72 printf("%s is %savailable\n", plain_name, res ? "" : "NOT "); in print_bool_feature() 78 int res; in print_kernel_option() local 88 res = strtol(value, &endptr, 0); in print_kernel_option() 90 jsonw_int_field(json_wtr, name, res); in print_kernel_option() 136 int res; in read_procfs() local 142 res = getline(&line, &len, fd); in read_procfs() 144 if (res < 0) in read_procfs() [all …]
|
/tools/testing/nvdimm/test/ |
D | iomap.c | 55 struct nfit_test_resource *res; in get_nfit_res() local 58 res = __get_nfit_res(resource); in get_nfit_res() 61 return res; in get_nfit_res() 72 - nfit_res->res.start; in __nfit_test_ioremap() 83 - nfit_res->res.start; in __wrap_devm_ioremap_nocache() 94 return nfit_res->buf + offset - nfit_res->res.start; in __wrap_devm_memremap() 129 resource_size_t offset = pgmap->res.start; in __wrap_devm_memremap_pages() 155 return nfit_res->buf + offset - nfit_res->res.start; in __wrap_devm_memremap_pages() 175 return nfit_res->buf + offset - nfit_res->res.start; in __wrap_memremap() 227 struct resource *res = *((struct resource **) data); in nfit_devres_release() local [all …]
|
/tools/virtio/ringtest/ |
D | main.h | 150 void __read_once_size(const volatile void *p, void *res, int size) in __read_once_size() argument 153 case 1: *(unsigned char *)res = *(volatile unsigned char *)p; break; \ in __read_once_size() 154 case 2: *(unsigned short *)res = *(volatile unsigned short *)p; break; \ in __read_once_size() 155 case 4: *(unsigned int *)res = *(volatile unsigned int *)p; break; \ in __read_once_size() 156 case 8: *(unsigned long long *)res = *(volatile unsigned long long *)p; break; \ in __read_once_size() 159 __builtin_memcpy((void *)res, (const void *)p, size); \ in __read_once_size() 164 static __always_inline void __write_once_size(volatile void *p, void *res, int size) in __write_once_size() argument 167 case 1: *(volatile unsigned char *)p = *(unsigned char *)res; break; in __write_once_size() 168 case 2: *(volatile unsigned short *)p = *(unsigned short *)res; break; in __write_once_size() 169 case 4: *(volatile unsigned int *)p = *(unsigned int *)res; break; in __write_once_size() [all …]
|
/tools/include/linux/ |
D | compiler.h | 105 static __always_inline void __read_once_size(const volatile void *p, void *res, int size) in __read_once_size() argument 108 case 1: *(__u8_alias_t *) res = *(volatile __u8_alias_t *) p; break; in __read_once_size() 109 case 2: *(__u16_alias_t *) res = *(volatile __u16_alias_t *) p; break; in __read_once_size() 110 case 4: *(__u32_alias_t *) res = *(volatile __u32_alias_t *) p; break; in __read_once_size() 111 case 8: *(__u64_alias_t *) res = *(volatile __u64_alias_t *) p; break; in __read_once_size() 114 __builtin_memcpy((void *)res, (const void *)p, size); in __read_once_size() 119 static __always_inline void __write_once_size(volatile void *p, void *res, int size) in __write_once_size() argument 122 case 1: *(volatile __u8_alias_t *) p = *(__u8_alias_t *) res; break; in __write_once_size() 123 case 2: *(volatile __u16_alias_t *) p = *(__u16_alias_t *) res; break; in __write_once_size() 124 case 4: *(volatile __u32_alias_t *) p = *(__u32_alias_t *) res; break; in __write_once_size() [all …]
|
/tools/testing/selftests/ptp/ |
D | phc.sh | 92 local res 94 res=$(phc_ctl $DEV set 0 wait 120.5 get 2> /dev/null \ 98 (( res == 120 )) 103 local res 105 res=$(phc_ctl $DEV set 0 adj 10 get 2> /dev/null \ 109 (( res == 10 )) 114 local res 117 res=$(phc_ctl $DEV freq 10000000 set 0 wait 100.5 get 2> /dev/null \ 121 (( res == 101 ))
|
/tools/testing/nvdimm/ |
D | dax-dev.c | 12 struct resource *res = &dev_dax->region->res; in dax_pgoff_to_phys() local 15 addr = pgoff * PAGE_SIZE + res->start; in dax_pgoff_to_phys() 16 if (addr >= res->start && addr <= res->end) { in dax_pgoff_to_phys() 17 if (addr + size - 1 <= res->end) { in dax_pgoff_to_phys()
|
/tools/testing/selftests/bpf/prog_tests/ |
D | attach_probe.c | 36 int err, prog_fd, duration = 0, res; in test_attach_probe() local 119 err = bpf_map_lookup_elem(results_map_fd, &kprobe_idx, &res); in test_attach_probe() 123 if (CHECK(res != kprobe_idx + 1, "check_kprobe_res", in test_attach_probe() 124 "wrong kprobe res: %d\n", res)) in test_attach_probe() 127 err = bpf_map_lookup_elem(results_map_fd, &kretprobe_idx, &res); in test_attach_probe() 131 if (CHECK(res != kretprobe_idx + 1, "check_kretprobe_res", in test_attach_probe() 132 "wrong kretprobe res: %d\n", res)) in test_attach_probe() 138 err = bpf_map_lookup_elem(results_map_fd, &uprobe_idx, &res); in test_attach_probe() 142 if (CHECK(res != uprobe_idx + 1, "check_uprobe_res", in test_attach_probe() 143 "wrong uprobe res: %d\n", res)) in test_attach_probe() [all …]
|
/tools/testing/selftests/tc-testing/plugin-lib/ |
D | valgrindPlugin.py | 43 res = TestResult('{}-mem'.format(self.testidlist[xx]), 'Test skipped') 44 res.set_result(ResultState.skip) 45 res.set_errormsg('Skipped because of prior setup/teardown failure') 46 self._add_results(res) 105 res = TestResult('{}-mem'.format(self.args.testid), 108 res.set_result(ResultState.skip) 109 res.set_errormsg('Test case designated as skipped.') 110 self._add_results(res) 147 res.set_result(ResultState.fail) 148 res.set_failmsg('Memory leak detected') [all …]
|
/tools/testing/selftests/futex/functional/ |
D | futex_wait_wouldblock.c | 43 int res, ret = RET_PASS; in main() local 69 res = futex_wait(&f1, f1+1, &to, FUTEX_PRIVATE_FLAG); in main() 70 if (!res || errno != EWOULDBLOCK) { in main() 72 res ? errno : res, res ? strerror(errno) : ""); in main()
|
D | futex_requeue_pi_signal_restart.c | 95 int res; in waiterfn() local 102 res = futex_wait_requeue_pi(&f1, old_val, &(f2), NULL, in waiterfn() 106 res, strerror(errno)); in waiterfn() 108 if (!res) in waiterfn() 123 int c, res, ret = RET_PASS; in main() local 158 res = create_rt_thread(&waiter, waiterfn, NULL, SCHED_FIFO, 1); in main() 159 if (res) { in main() 160 error("Creating waiting thread failed", res); in main() 182 res = futex_cmp_requeue_pi(&f1, old_val, &(f2), 1, 0, in main() 190 if (res > 0) { in main() [all …]
|
D | futex_wait_private_mapped_file.c | 76 int res; in main() local 112 res = futex_wake(&val, 1, 0); in main() 113 info("futex_wake %d\n", res); in main() 114 if (res != 1) { in main()
|
D | futex_wait_timeout.c | 44 int res, ret = RET_PASS; in main() local 78 res = futex_wait(&f1, f1, &to, FUTEX_PRIVATE_FLAG); in main() 79 if (!res || errno != ETIMEDOUT) { in main()
|
D | futex_wait_uninitialized_heap.c | 53 int res; in wait_thread() local 56 res = futex_wait(buf, 1, NULL, 0); in wait_thread() 59 if (res != 0 && errno != EWOULDBLOCK) { in wait_thread()
|
/tools/testing/selftests/tc-testing/ |
D | tdc.py | 254 res = TestResult(tidx['id'], tidx['name']) 261 res = TestResult(tidx['id'], tidx['name']) 262 res.set_result(ResultState.skip) 263 res.set_errormsg('Test case designated as skipped.') 266 return res 289 res.set_result(ResultState.fail) 290 …res.set_failmsg('Command exited with {}, expected {}\n{}'.format(exit_code, tidx["expExitCode"], p… 301 res.set_result(ResultState.fail) 302 … res.set_failmsg('Could not match regex pattern. Verify command output:\n{}'.format(procout)) 304 res.set_result(ResultState.success) [all …]
|
/tools/testing/selftests/networking/timestamping/ |
D | timestamping.c | 121 int res; in sendpacket() local 123 res = sendto(sock, sync, sizeof(sync), 0, in sendpacket() 126 if (res < 0) in sendpacket() 131 res); in sendpacket() 134 static void printpacket(struct msghdr *msg, int res, in printpacket() argument 150 res, in printpacket() 213 if (res < sizeof(sync)) in printpacket() 215 else if (!memcmp(sync, data + res - sizeof(sync), in printpacket() 270 int res; in recvpacket() local 282 res = recvmsg(sock, &msg, recvmsg_flags|MSG_DONTWAIT); in recvpacket() [all …]
|
/tools/testing/selftests/net/ |
D | ip_defrag.c | 104 uint16_t res; in udp_checksum() local 110 res = 0xffff & ~sum; in udp_checksum() 111 if (res) in udp_checksum() 112 return htons(res); in udp_checksum() 120 uint16_t res; in udp6_checksum() local 127 res = 0xffff & ~sum; in udp6_checksum() 128 if (res) in udp6_checksum() 129 return htons(res); in udp6_checksum() 138 int res; in send_fragment() local 194 res = sendto(fd_raw, ip_frame, frag_len, 0, addr, alen); in send_fragment() [all …]
|
/tools/testing/selftests/bpf/verifier/ |
D | wide_access.c | 1 #define BPF_SOCK_ADDR_STORE(field, off, res, err) \ argument 10 .result = res, \ 38 #define BPF_SOCK_ADDR_LOAD(field, off, res, err) \ argument 47 .result = res, \
|
/tools/testing/selftests/bpf/ |
D | test_tcpbpf_user.c | 60 int res; in verify_sockopt_result() local 64 rv = bpf_map_lookup_elem(sock_map_fd, &key, &res); in verify_sockopt_result() 66 EXPECT_EQ(0, res, "d"); in verify_sockopt_result() 69 rv = bpf_map_lookup_elem(sock_map_fd, &key, &res); in verify_sockopt_result() 71 EXPECT_EQ(1, res, "d"); in verify_sockopt_result()
|
/tools/io_uring/ |
D | io_uring-cp.c | 188 if (cqe->res < 0) { in copy_file() 189 if (cqe->res == -EAGAIN) { in copy_file() 195 strerror(-cqe->res)); in copy_file() 197 } else if ((size_t) cqe->res != data->iov.iov_len) { in copy_file() 199 data->iov.iov_base += cqe->res; in copy_file() 200 data->iov.iov_len -= cqe->res; in copy_file() 201 data->offset += cqe->res; in copy_file()
|
/tools/perf/util/ |
D | expr.y | 39 static int expr__lex(YYSTYPE *res, const char **pp); 96 static int expr__symbol(YYSTYPE *res, const char *p, const char **pp) 98 char *dst = res->id; 121 dst = res->id; 145 static int expr__lex(YYSTYPE *res, const char **pp) 158 return expr__symbol(res, p - 1, pp); 160 res->num = strtod(s, (char **)&p);
|
/tools/testing/selftests/filesystems/incfs/ |
D | incfs_test.c | 321 int res; in get_file_attr() local 323 res = getxattr(path, INCFS_XATTR_METADATA_NAME, value, size); in get_file_attr() 324 if (res < 0) in get_file_attr() 325 res = -errno; in get_file_attr() 328 return res; in get_file_attr() 435 int res = emit_test_blocks(mnt_dir, file, &block_index, 1); in emit_test_block() local 437 if (res == 0) in emit_test_block() 439 if (res == 1) in emit_test_block() 441 return res; in emit_test_block() 1261 int res; in dynamic_files_and_data_test() local [all …]
|
/tools/perf/pmu-events/ |
D | json.c | 87 jsmnerr_t res; in parse_json() local 99 res = jsmn_parse(&parser, *map, *size, tokens, in parse_json() 101 if (res != JSMN_SUCCESS) { in parse_json() 102 pr_err("%s: json error %s\n", fn, jsmn_strerror(res)); in parse_json()
|
/tools/testing/selftests/kvm/x86_64/ |
D | mmio_warning_test.c | 42 int res; in thr() local 46 res = ioctl(kvmcpu, KVM_RUN, 0); in thr() 48 res, run->exit_reason, run->internal.suberror); in thr()
|