Home
last modified time | relevance | path

Searched refs:res (Results 1 – 25 of 74) sorted by relevance

123

/tools/lib/
Dhweight.c20 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 …]
Dstring.c48 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/
Dfeature.c64 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/
Diomap.c55 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/
Dmain.h150 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/
Dcompiler.h105 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/
Dphc.sh92 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/
Ddax-dev.c12 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/
Dattach_probe.c37 int err, prog_fd, duration = 0, res; in test_attach_probe() local
120 err = bpf_map_lookup_elem(results_map_fd, &kprobe_idx, &res); in test_attach_probe()
124 if (CHECK(res != kprobe_idx + 1, "check_kprobe_res", in test_attach_probe()
125 "wrong kprobe res: %d\n", res)) in test_attach_probe()
128 err = bpf_map_lookup_elem(results_map_fd, &kretprobe_idx, &res); in test_attach_probe()
132 if (CHECK(res != kretprobe_idx + 1, "check_kretprobe_res", in test_attach_probe()
133 "wrong kretprobe res: %d\n", res)) in test_attach_probe()
139 err = bpf_map_lookup_elem(results_map_fd, &uprobe_idx, &res); in test_attach_probe()
143 if (CHECK(res != uprobe_idx + 1, "check_uprobe_res", in test_attach_probe()
144 "wrong uprobe res: %d\n", res)) in test_attach_probe()
[all …]
/tools/testing/selftests/tc-testing/plugin-lib/
DvalgrindPlugin.py43 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/
Dfutex_wait_wouldblock.c43 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()
Dfutex_requeue_pi_signal_restart.c95 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 …]
Dfutex_wait_private_mapped_file.c76 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()
Dfutex_wait_timeout.c44 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()
Dfutex_wait_uninitialized_heap.c53 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/
Dtdc.py254 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)
290res.set_failmsg('Command exited with {}, expected {}\n{}'.format(exit_code, tidx["expExitCode"], p…
301 res.set_result(ResultState.fail)
302res.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/
Dtimestamping.c121 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/
Dip_defrag.c104 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 …]
Dtls.c825 int res = fork(); in TEST_F() local
827 EXPECT_NE(res, -1); in TEST_F()
829 if (res) { in TEST_F()
837 int res = send(self->fd, buf, in TEST_F() local
840 EXPECT_GE(res, 0); in TEST_F()
841 left -= res; in TEST_F()
846 EXPECT_EQ(res, pid2); in TEST_F()
853 int res = recv(self->cfd, buf, in TEST_F() local
856 EXPECT_GE(res, 0); in TEST_F()
857 left -= res; in TEST_F()
[all …]
/tools/testing/selftests/bpf/verifier/
Dwide_access.c1 #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/perf/util/
Dexpr.y40 static int expr__lex(YYSTYPE *res, const char **pp);
97 static int expr__symbol(YYSTYPE *res, const char *p, const char **pp)
99 char *dst = res->id;
122 dst = res->id;
146 static int expr__lex(YYSTYPE *res, const char **pp)
159 return expr__symbol(res, p - 1, pp);
161 res->num = strtod(s, (char **)&p);
/tools/io_uring/
Dio_uring-cp.c188 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/testing/selftests/bpf/
Dtest_tcpbpf_user.c64 int res; in verify_sockopt_result() local
68 rv = bpf_map_lookup_elem(sock_map_fd, &key, &res); in verify_sockopt_result()
70 EXPECT_EQ(0, res, "d"); in verify_sockopt_result()
73 rv = bpf_map_lookup_elem(sock_map_fd, &key, &res); in verify_sockopt_result()
75 EXPECT_EQ(1, res, "d"); in verify_sockopt_result()
/tools/perf/pmu-events/
Djson.c87 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/
Dmmio_warning_test.c42 int res; in thr() local
46 res = ioctl(kvmcpu, KVM_RUN, 0); in thr()
48 res, run->exit_reason, run->internal.suberror); in thr()

123