Home
last modified time | relevance | path

Searched refs:pfd (Results 1 – 25 of 47) sorted by relevance

12

/linux/drivers/clk/imx/
H A Dclk-pfdv2.c43 static int clk_pfdv2_wait(struct clk_pfdv2 *pfd) in clk_pfdv2_wait() argument
47 return readl_poll_timeout(pfd->reg, val, val & (1 << pfd->vld_bit), in clk_pfdv2_wait()
53 struct clk_pfdv2 *pfd = to_clk_pfdv2(hw); in clk_pfdv2_enable() local
58 val = readl_relaxed(pfd->reg); in clk_pfdv2_enable()
59 val &= ~(1 << pfd->gate_bit); in clk_pfdv2_enable()
60 writel_relaxed(val, pfd->reg); in clk_pfdv2_enable()
63 return clk_pfdv2_wait(pfd); in clk_pfdv2_enable()
68 struct clk_pfdv2 *pfd = to_clk_pfdv2(hw); in clk_pfdv2_disable() local
73 val = readl_relaxed(pfd->reg); in clk_pfdv2_disable()
74 val |= (1 << pfd->gate_bit); in clk_pfdv2_disable()
[all …]
/linux/tools/testing/selftests/net/af_unix/
H A Dtest_unix_oob.c
H A Dscm_pidfd.c489 int pfd; in TEST_F() local
525 pfd = accept(self->server, NULL, NULL); in TEST_F()
526 ASSERT_NE(-1, pfd); in TEST_F()
528 pfd = self->server; in TEST_F()
536 …err = sendto(pfd, "x", sizeof(char), 0, (struct sockaddr *)&self->client_addr->listen_addr, self->… in TEST_F()
539 err = send(pfd, "x", sizeof(char), 0); in TEST_F()
547 err = sk_enable_cred_pass(pfd); in TEST_F()
550 err = cmsg_check_dead(pfd, self->client_pid); in TEST_F()
553 close(pfd); in TEST_F()
/linux/tools/testing/selftests/ftrace/
H A Dpoll.c24 struct pollfd pfd = {.events = POLLIN}; in main() local
32 pfd.events = POLLIN; in main()
35 pfd.events = POLLPRI; in main()
51 pfd.fd = open(argv[optind], O_RDONLY); in main()
52 if (pfd.fd < 0) { in main()
59 if (pfd.events & POLLIN) in main()
60 do {} while (read(pfd.fd, buf, BUFSIZE) == BUFSIZE); in main()
62 ret = poll(&pfd, 1, timeout); in main()
67 close(pfd.fd); in main()
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dperf_branches.c118 int pfd; in test_perf_branches_hw()
128 pfd = syscall(__NR_perf_event_open, &attr, -1, 0, -1, PERF_FLAG_FD_CLOEXEC); in test_perf_branches_hw()
134 if (pfd < 0) { in test_perf_branches_hw()
141 if (CHECK(pfd < 0, "perf_event_open", "err %d errno %d\n",
142 pfd, errno))
146 test_perf_branches_common(pfd, check_good_sample); in test_perf_branches_no_hw()
148 close(pfd); in test_perf_branches_no_hw()
159 int pfd; in test_perf_branches_no_hw()
167 pfd = syscall(__NR_perf_event_open, &attr, -1, 0, -1, PERF_FLAG_FD_CLOEXEC); in test_perf_branches()
168 if (CHECK(pfd < in test_perf_branches()
106 int pfd; test_perf_branches_hw() local
147 int pfd; test_perf_branches_no_hw() local
[all...]
H A Dfind_vma.c28 int pfd; in open_pe() local
36 pfd = syscall(__NR_perf_event_open, &attr, 0, -1, -1, PERF_FLAG_FD_CLOEXEC); in open_pe()
38 return pfd >= 0 ? pfd : -errno; in open_pe()
53 int pfd, i; in test_find_vma_pe() local
56 pfd = open_pe(); in test_find_vma_pe()
57 if (pfd < 0) { in test_find_vma_pe()
58 if (pfd == -ENOENT || pfd == -EOPNOTSUPP) { in test_find_vma_pe()
63 if (!ASSERT_GE(pfd, 0, "perf_event_open")) in test_find_vma_pe()
67 link = bpf_program__attach_perf_event(skel->progs.handle_pe, pfd); in test_find_vma_pe()
77 close(pfd); in test_find_vma_pe()
H A Dpe_preserve_elems.c12 int err, key = 0, pfd = -1, mfd = bpf_map__fd(map); in test_one_map() local
20 pfd = syscall(__NR_perf_event_open, &attr, 0 /* pid */, in test_one_map()
22 if (CHECK(pfd < 0, "perf_event_open", "failed\n")) in test_one_map()
25 err = bpf_map_update_elem(mfd, &key, &pfd, BPF_ANY); in test_one_map()
26 close(pfd); in test_one_map()
H A Dcrypto_sanity.c91 int sockfd, err, pfd; in test_crypto_sanity() local
120 pfd = bpf_program__fd(skel->progs.skb_crypto_setup); in test_crypto_sanity()
121 if (!ASSERT_GT(pfd, 0, "skb_crypto_setup fd")) in test_crypto_sanity()
124 err = bpf_prog_test_run_opts(pfd, &opts); in test_crypto_sanity()
/linux/tools/testing/selftests/filesystems/nsfs/
H A Downer.c28 int pfd[2], ns, uns, init_uns; in main() local
34 if (pipe(pfd)) in main()
44 close(pfd[0]); in main()
45 close(pfd[1]); in main()
50 close(pfd[1]); in main()
51 if (read(pfd[0], &c, 1) != 0) in main()
53 close(pfd[0]); in main()
/linux/tools/testing/selftests/filesystems/epoll/
H A Depoll_wakeup_test.c63 struct pollfd pfd; in waiter_entry1ap() local
67 pfd.fd = ctx->efd[0]; in waiter_entry1ap()
68 pfd.events = POLLIN; in waiter_entry1ap()
69 if (poll(&pfd, 1, -1) > 0) { in waiter_entry1ap()
90 struct pollfd pfd; in waiter_entry1op() local
94 pfd.fd = ctx->efd[0]; in waiter_entry1op()
95 pfd.events = POLLIN; in waiter_entry1op()
96 if (poll(&pfd, 1, -1) > 0) { in waiter_entry1op()
117 struct pollfd pfd; in waiter_entry2ap() local
121 pfd.fd = ctx->efd[0]; in waiter_entry2ap()
[all …]
/linux/tools/testing/selftests/bpf/benchs/
H A Dbench_bpf_crypto.c12 int pfd; member
81 int err, pfd; in crypto_setup() local
119 pfd = bpf_program__fd(ctx.skel->progs.crypto_setup); in crypto_setup()
120 if (pfd < 0) { in crypto_setup()
126 err = bpf_prog_test_run_opts(pfd, &opts); in crypto_setup()
138 ctx.pfd = bpf_program__fd(ctx.skel->progs.crypto_encrypt); in crypto_encrypt_setup()
144 ctx.pfd = bpf_program__fd(ctx.skel->progs.crypto_decrypt); in crypto_decrypt_setup()
161 (void)bpf_prog_test_run_opts(ctx.pfd, &opts); in crypto_producer()
/linux/tools/testing/selftests/net/
H A Dpsock_tpacket.c222 struct pollfd pfd; in walk_v1_v2_rx() local
231 memset(&pfd, 0, sizeof(pfd)); in walk_v1_v2_rx()
232 pfd.fd = sock; in walk_v1_v2_rx()
233 pfd.events = POLLIN | POLLERR; in walk_v1_v2_rx()
234 pfd.revents = 0; in walk_v1_v2_rx()
265 poll(&pfd, 1, 1); in walk_v1_v2_rx()
371 struct pollfd pfd; in walk_tx() local
410 memset(&pfd, 0, sizeof(pfd)); in walk_tx()
411 pfd.fd = sock; in walk_tx()
412 pfd.events = POLLOUT | POLLERR; in walk_tx()
[all …]
H A Dudpgso_bench_rx.c94 struct pollfd pfd; in do_poll() local
97 pfd.events = POLLIN; in do_poll()
98 pfd.revents = 0; in do_poll()
99 pfd.fd = fd; in do_poll()
102 ret = poll(&pfd, 1, 10); in do_poll()
120 if (pfd.revents != POLLIN) in do_poll()
122 pfd.revents, POLLIN); in do_poll()
H A Dpsock_fanout.c189 int pfd; in sock_fanout_set_ebpf() local
200 pfd = syscall(__NR_bpf, BPF_PROG_LOAD, &attr, sizeof(attr)); in sock_fanout_set_ebpf()
201 if (pfd < 0) { in sock_fanout_set_ebpf()
207 if (setsockopt(fd, SOL_PACKET, PACKET_FANOUT_DATA, &pfd, sizeof(pfd))) { in sock_fanout_set_ebpf()
212 if (close(pfd)) { in sock_fanout_set_ebpf()
H A Dmsg_zerocopy.c146 struct pollfd pfd; in do_poll() local
149 pfd.events = events; in do_poll()
150 pfd.revents = 0; in do_poll()
151 pfd.fd = fd; in do_poll()
153 ret = poll(&pfd, 1, cfg_waittime_ms); in do_poll()
157 return ret && (pfd.revents & events); in do_poll()
/linux/tools/gpio/
H A Dgpio-watch.c27 struct pollfd pfd; in main() local
55 pfd.fd = fd; in main()
56 pfd.events = POLLIN | POLLPRI; in main()
59 ret = poll(&pfd, 1, 5000); in main()
65 rd = read(pfd.fd, &chg, sizeof(chg)); in main()
/linux/arch/mips/alchemy/devboards/
H A Dplatform.c155 struct physmap_flash_data *pfd; in db1x_register_norflash() local
173 pfd = kzalloc(sizeof(struct physmap_flash_data), GFP_KERNEL); in db1x_register_norflash()
174 if (!pfd) in db1x_register_norflash()
227 pfd->width = width; in db1x_register_norflash()
228 pfd->parts = parts; in db1x_register_norflash()
229 pfd->nr_parts = 5; in db1x_register_norflash()
231 pd->dev.platform_data = pfd; in db1x_register_norflash()
241 kfree(pfd); in db1x_register_norflash()
/linux/tools/testing/selftests/pidfd/
H A Dpidfd_wait.c87 int pfd[2]; in TEST() local
93 ASSERT_EQ(pipe(pfd), 0); in TEST()
100 close(pfd[1]); in TEST()
102 ASSERT_EQ(read(pfd[0], buf, 1), 1); in TEST()
103 close(pfd[0]); in TEST()
108 close(pfd[0]); in TEST()
117 ASSERT_EQ(write(pfd[1], "C", 1), 1); in TEST()
118 close(pfd[1]); in TEST()
/linux/drivers/clk/
H A Dclk-versaclock3.c249 const struct vc3_pfd_data *pfd = vc3->data; in vc3_pfd_recalc_rate() local
254 regmap_read(vc3->regmap, pfd->offs, &prediv); in vc3_pfd_recalc_rate()
255 if (pfd->num == VC3_PFD1) { in vc3_pfd_recalc_rate()
257 if (prediv & pfd->mdiv1_bitmsk) { in vc3_pfd_recalc_rate()
265 } else if (pfd->num == VC3_PFD2) { in vc3_pfd_recalc_rate()
267 if (prediv & pfd->mdiv1_bitmsk) { in vc3_pfd_recalc_rate()
278 if (prediv & pfd->mdiv1_bitmsk) in vc3_pfd_recalc_rate()
284 if (prediv & pfd->mdiv2_bitmsk) in vc3_pfd_recalc_rate()
296 const struct vc3_pfd_data *pfd = vc3->data; in vc3_pfd_determine_rate() local
311 if (pfd->num == VC3_PFD1 || pfd->num == VC3_PFD3) { in vc3_pfd_determine_rate()
[all …]
/linux/tools/testing/selftests/sched/
H A Dcs_prctl_test.c68 int pfd[2]; member
157 close(ca->pfd[0]); in child_func_process()
161 ret = write(ca->pfd[1], &ca->thr_tids, sizeof(int) * ca->num_threads); in child_func_process()
164 ca->pfd[1], strerror(errno)); in child_func_process()
166 close(ca->pfd[1]); in child_func_process()
183 if (pipe(proc[i].pfd) == -1) in create_processes()
189 close(proc[i].pfd[1]); in create_processes()
193 ret = read(proc[i].pfd[0], &proc[i].thr_tids, sizeof(int) * proc[i].num_threads); in create_processes()
197 close(proc[i].pfd[0]); in create_processes()
/linux/samples/timers/
H A Dhpet_example.c135 struct pollfd pfd; in hpet_poll() local
178 pfd.fd = fd; in hpet_poll()
179 pfd.events = POLLIN; in hpet_poll()
182 pfd.revents = 0; in hpet_poll()
184 if (poll(&pfd, 1, -1) < 0) in hpet_poll()
197 pfd.revents); in hpet_poll()
/linux/samples/connector/
H A Ducon.c107 struct pollfd pfd; in main() local
188 pfd.fd = s; in main()
191 pfd.events = POLLIN; in main()
192 pfd.revents = 0; in main()
193 switch (poll(&pfd, 1, -1)) { in main()
/linux/Documentation/translations/zh_CN/networking/
H A Dmsg_zerocopy.rst116 pfd.fd = fd;
117 pfd.events = 0;
118 if (poll(&pfd, 1, -1) != 1 || pfd.revents & POLLERR == 0)
/linux/tools/hv/
H A Dhv_vss_daemon.c213 struct pollfd pfd; in main() local
278 pfd.fd = vss_fd; in main()
281 pfd.events = POLLIN; in main()
282 pfd.revents = 0; in main()
284 if (poll(&pfd, 1, -1) < 0) { in main()
/linux/tools/testing/selftests/bpf/
H A Dtest_lirc_mode2_user.c114 struct pollfd pfd = { .fd = inputfd, .events = POLLIN }; in main() local
118 poll(&pfd, 1, 100); in main()
141 poll(&pfd, 1, 100); in main()

12