/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 …]
|
/tools/testing/selftests/futex/functional/ |
D | futex_requeue.c | 44 int res, ret = RET_PASS; in main() local 82 res = futex_cmp_requeue(f1, 0, &f2, 0, 1, 0); in main() 83 if (res != 1) { in main() 85 res ? errno : res, in main() 86 res ? strerror(errno) : ""); in main() 92 res = futex_wake(&f2, 1, 0); in main() 93 if (res != 1) { in main() 95 res ? errno : res, in main() 96 res ? strerror(errno) : ""); in main() 115 res = futex_cmp_requeue(f1, 0, &f2, 3, 7, 0); in main() [all …]
|
D | futex_wait_timeout.c | 63 static void test_timeout(int res, int *ret, char *test_name, int err) in test_timeout() argument 65 if (!res || errno != err) { in test_timeout() 67 res < 0 ? errno : res); in test_timeout() 98 int res, ret = RET_PASS; in main() local 136 res = futex_wait(&f1, f1, &to, 0); in main() 137 test_timeout(res, &ret, "futex_wait relative", ETIMEDOUT); in main() 142 res = futex_wait_bitset(&f1, f1, &to, 1, FUTEX_CLOCK_REALTIME); in main() 143 test_timeout(res, &ret, "futex_wait_bitset realtime", ETIMEDOUT); in main() 148 res = futex_wait_bitset(&f1, f1, &to, 1, 0); in main() 149 test_timeout(res, &ret, "futex_wait_bitset monotonic", ETIMEDOUT); in main() [all …]
|
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 …]
|
/tools/perf/util/ |
D | fncache.c | 11 bool res; member 27 static bool lookup_fncache(const char *name, bool *res) in lookup_fncache() argument 34 *res = n->res; in lookup_fncache() 41 static void update_fncache(const char *name, bool res) in update_fncache() argument 49 n->res = res; in update_fncache() 56 bool res; in file_available() local 58 if (lookup_fncache(name, &res)) in file_available() 59 return res; in file_available() 60 res = access(name, R_OK) == 0; in file_available() 61 update_fncache(name, res); in file_available() [all …]
|
/tools/bpf/bpftool/ |
D | feature.c | 72 const char *define_name, bool res, const char *define_prefix) in print_bool_feature() argument 75 jsonw_bool_field(json_wtr, feat_name, res); in print_bool_feature() 78 res ? "" : "NO_", define_name); in print_bool_feature() 80 printf("%s is %savailable\n", plain_name, res ? "" : "NOT "); in print_bool_feature() 87 int res; in print_kernel_option() local 95 res = strtol(value, &endptr, 0); in print_kernel_option() 97 jsonw_int_field(json_wtr, name, res); in print_kernel_option() 143 long res; in read_procfs() local 149 res = getline(&line, &len, fd); in read_procfs() 151 if (res < 0) in read_procfs() [all …]
|
D | struct_ops.c | 24 struct res { struct 172 static int cmd_retval(const struct res *res, bool must_have_one_map) in cmd_retval() argument 174 if (res->nr_errs || (!res->nr_maps && must_have_one_map)) in cmd_retval() 188 static struct res do_search(const char *name, work_func func, void *data, in do_search() 192 struct res res = {}; in do_search() local 198 res.nr_errs++; in do_search() 199 return res; in do_search() 205 res.nr_maps++; in do_search() 208 res.nr_errs++; in do_search() 215 res.nr_errs++; in do_search() [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() 94 return nfit_res->buf + offset - nfit_res->res.start; in __wrap_devm_memremap() 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 229 WARN_ON(!nfit_test_release_region(NULL, &iomem_resource, res->start, in nfit_devres_release() [all …]
|
D | ndtest.c | 409 if (addr >= n->res.start && (addr < n->res.start in ndtest_resource_lookup() 410 + resource_size(&n->res))) { in ndtest_resource_lookup() 415 + resource_size(&n->res))) { in ndtest_resource_lookup() 432 struct nfit_test_resource *res = data; in ndtest_release_resource() local 435 list_del(&res->list); in ndtest_release_resource() 438 if (resource_size(&res->res) >= DIMM_SIZE) in ndtest_release_resource() 439 gen_pool_free(ndtest_pool, res->res.start, in ndtest_release_resource() 440 resource_size(&res->res)); in ndtest_release_resource() 441 vfree(res->buf); in ndtest_release_resource() 442 kfree(res); in ndtest_release_resource() [all …]
|
/tools/testing/selftests/bpf/progs/ |
D | test_rdonly_maps.c | 22 } res = {}; variable 37 res.did_run = 1; in skip_loop() 38 res.iters = iters; in skip_loop() 39 res.sum = sum; in skip_loop() 56 res.did_run = 1; in part_loop() 57 res.iters = iters; in part_loop() 58 res.sum = sum; in part_loop() 77 res.did_run = 1; in full_loop() 78 res.iters = iters; in full_loop() 79 res.sum = sum; in full_loop()
|
/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/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/selftests/resctrl/ |
D | resctrl_tests.c | 21 char *res; in detect_vendor() local 26 res = fgrep(inf, "vendor_id"); in detect_vendor() 28 if (res) in detect_vendor() 29 s = strchr(res, ':'); in detect_vendor() 37 free(res); in detect_vendor() 76 int res; in run_mbm_test() local 87 res = mbm_bw_change(span, cpu_no, bw_report, benchmark_cmd); in run_mbm_test() 88 ksft_test_result(!res, "MBM: bw change\n"); in run_mbm_test() 95 int res; in run_mba_test() local 106 res = mba_schemata_change(cpu_no, bw_report, benchmark_cmd); in run_mba_test() [all …]
|
/tools/testing/selftests/filesystems/fuse/ |
D | bpf_loader.c | 149 int res; in s_link() local 152 res = link(src_pathname.s, dst_pathname.s); in s_link() 154 res = -1; in s_link() 160 return res; in s_link() 165 int res; in s_symlink() local 168 res = symlink(src_pathname.s, dst_pathname.s); in s_symlink() 170 res = -1; in s_symlink() 176 return res; in s_symlink() 182 int res; in s_mkdir() local 189 res = mkdir(pathname.s, mode); in s_mkdir() [all …]
|
/tools/include/linux/ |
D | compiler.h | 127 static __always_inline void __read_once_size(const volatile void *p, void *res, int size) in __read_once_size() argument 130 case 1: *(__u8_alias_t *) res = *(volatile __u8_alias_t *) p; break; in __read_once_size() 131 case 2: *(__u16_alias_t *) res = *(volatile __u16_alias_t *) p; break; in __read_once_size() 132 case 4: *(__u32_alias_t *) res = *(volatile __u32_alias_t *) p; break; in __read_once_size() 133 case 8: *(__u64_alias_t *) res = *(volatile __u64_alias_t *) p; break; in __read_once_size() 136 __builtin_memcpy((void *)res, (const void *)p, size); in __read_once_size() 141 static __always_inline void __write_once_size(volatile void *p, void *res, int size) in __write_once_size() argument 144 case 1: *(volatile __u8_alias_t *) p = *(__u8_alias_t *) res; break; in __write_once_size() 145 case 2: *(volatile __u16_alias_t *) p = *(__u16_alias_t *) res; break; in __write_once_size() 146 case 4: *(volatile __u32_alias_t *) p = *(__u32_alias_t *) res; break; in __write_once_size() [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/perf/tests/shell/ |
D | stat+shadow_stat.sh | 36 res=`printf "%.2f" $(echo "scale=6; $num / $cyc" | bc -q)` 37 if [ "$ipc" != "$res" ]; then 38 echo "IPC is different: $res != $ipc ($num / $cyc)" 70 res=`printf "%.2f" $(echo "scale=6; $num / $cyc" | bc -q)` 71 if [ "$ipc" != "$res" ]; then 72 echo "IPC is different for $cpu: $res != $ipc ($num / $cyc)"
|
/tools/testing/selftests/powerpc/ptrace/ |
D | perf-hwbreak.c | 107 size_t res; in read_fds() local 110 res = read(fd[i], &c, sizeof(c)); in read_fds() 111 assert(res == sizeof(unsigned long long)); in read_fds() 181 size_t res; in runtestsingle() local 225 res = read(break_fd, &breaks, sizeof(unsigned long long)); in runtestsingle() 226 assert(res == sizeof(unsigned long long)); in runtestsingle() 254 size_t res; in runtest_dar_outside() local 276 res = read(break_fd, &breaks, sizeof(unsigned long long)); in runtest_dar_outside() 277 assert(res == sizeof(unsigned long long)); in runtest_dar_outside() 291 res = read(break_fd, &breaks, sizeof(unsigned long long)); in runtest_dar_outside() [all …]
|
/tools/testing/selftests/kvm/x86_64/ |
D | get_msr_index_features.c | 37 int old_res, res, kvm_fd, r; in test_get_msr_index() local 46 res = kvm_num_index_msrs(kvm_fd, 1); in test_get_msr_index() 47 TEST_ASSERT(res > 1, "Expecting nmsrs to be > 1"); in test_get_msr_index() 48 TEST_ASSERT(res == old_res, "Expecting nmsrs to be identical"); in test_get_msr_index() 99 int res, old_res, i, kvm_fd; in test_get_msr_feature() local 108 res = kvm_num_feature_msrs(kvm_fd, 1); in test_get_msr_feature() 109 TEST_ASSERT(res > 1, "Expecting nmsrs to be > 1"); in test_get_msr_feature() 110 TEST_ASSERT(res == old_res, "Expecting nmsrs to be identical"); in test_get_msr_feature()
|
D | set_boot_cpu_id.c | 43 int res; in test_set_boot_busy() local 45 res = _vm_ioctl(vm, KVM_SET_BOOT_CPU_ID, (void *) VCPU_ID0); in test_set_boot_busy() 46 TEST_ASSERT(res == -1 && errno == EBUSY, in test_set_boot_busy() 129 int res; in check_set_bsp_busy() local 136 res = _vm_ioctl(vm, KVM_SET_BOOT_CPU_ID, (void *) VCPU_ID1); in check_set_bsp_busy() 137 TEST_ASSERT(res == -1 && errno == EBUSY, "KVM_SET_BOOT_CPU_ID set after adding vcpu"); in check_set_bsp_busy() 142 res = _vm_ioctl(vm, KVM_SET_BOOT_CPU_ID, (void *) VCPU_ID1); in check_set_bsp_busy() 143 TEST_ASSERT(res == -1 && errno == EBUSY, "KVM_SET_BOOT_CPU_ID set to a terminated vcpu"); in check_set_bsp_busy()
|
/tools/testing/selftests/bpf/ |
D | bench.h | 44 void (*measure)(struct bench_res* res); 45 void (*report_progress)(int iter, struct bench_res* res, long delta_ns); 46 void (*report_final)(struct bench_res res[], int res_cnt); 57 void hits_drops_report_progress(int iter, struct bench_res *res, long delta_ns); 58 void hits_drops_report_final(struct bench_res res[], int res_cnt);
|
/tools/testing/selftests/bpf/prog_tests/ |
D | core_retro.c | 9 int err, zero = 0, res, duration = 0, my_pid = getpid(); in test_core_retro() local 29 err = bpf_map_lookup_elem(bpf_map__fd(skel->maps.results), &zero, &res); in test_core_retro() 33 CHECK(res != my_pid, "pid_check", "got %d != exp %d\n", res, my_pid); in test_core_retro()
|
/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/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 …]
|