Home
last modified time | relevance | path

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

12

/linux/drivers/clk/imx/
A Dclk-pfdv2.c47 return readl_poll_timeout(pfd->reg, val, val & (1 << pfd->vld_bit), in clk_pfdv2_wait()
86 frac = (readl_relaxed(pfd->reg) >> pfd->frac_off) in clk_pfdv2_recalc_rate()
146 if (readl_relaxed(pfd->reg) & (1 << pfd->gate_bit)) in clk_pfdv2_is_enabled()
207 struct clk_pfdv2 *pfd; in imx_clk_hw_pfdv2() local
213 pfd = kzalloc(sizeof(*pfd), GFP_KERNEL); in imx_clk_hw_pfdv2()
214 if (!pfd) in imx_clk_hw_pfdv2()
217 pfd->reg = reg; in imx_clk_hw_pfdv2()
219 pfd->vld_bit = pfd->gate_bit - 1; in imx_clk_hw_pfdv2()
231 pfd->hw.init = &init; in imx_clk_hw_pfdv2()
233 hw = &pfd->hw; in imx_clk_hw_pfdv2()
[all …]
A Dclk-pfd.c39 writel_relaxed(1 << ((pfd->idx + 1) * 8 - 1), pfd->reg + CLR); in clk_pfd_enable()
48 writel_relaxed(1 << ((pfd->idx + 1) * 8 - 1), pfd->reg + SET); in clk_pfd_disable()
56 u8 frac = (readl_relaxed(pfd->reg) >> (pfd->idx * 8)) & 0x3f; in clk_pfd_recalc_rate()
99 writel_relaxed(0x3f << (pfd->idx * 8), pfd->reg + CLR); in clk_pfd_set_rate()
100 writel_relaxed(frac << (pfd->idx * 8), pfd->reg + SET); in clk_pfd_set_rate()
132 pfd = kzalloc(sizeof(*pfd), GFP_KERNEL); in imx_clk_hw_pfd()
133 if (!pfd) in imx_clk_hw_pfd()
136 pfd->reg = reg; in imx_clk_hw_pfd()
137 pfd->idx = idx; in imx_clk_hw_pfd()
146 hw = &pfd->hw; in imx_clk_hw_pfd()
[all …]
/linux/tools/testing/selftests/net/af_unix/
A Dtest_unix_oob.c99 len = read(pfd, buf, size); in read_data()
111 pfds[0].fd = pfd; in wait_for_data()
177 int lfd, pfd; in main() local
225 read_oob(pfd, &oob); in main()
246 read_oob(pfd, &oob); in main()
270 atmark = is_sioctatmark(pfd); in main()
271 read_oob(pfd, &oob); in main()
302 set_filemode(pfd, 0); in main()
309 read_oob(pfd, &oob); in main()
317 set_filemode(pfd, 1); in main()
[all …]
/linux/tools/testing/selftests/bpf/prog_tests/
A Dperf_branches.c106 int pfd; in test_perf_branches_hw() local
116 pfd = syscall(__NR_perf_event_open, &attr, -1, 0, -1, PERF_FLAG_FD_CLOEXEC); in test_perf_branches_hw()
122 if (pfd < 0) { in test_perf_branches_hw()
129 if (CHECK(pfd < 0, "perf_event_open", "err %d errno %d\n", in test_perf_branches_hw()
130 pfd, errno)) in test_perf_branches_hw()
134 test_perf_branches_common(pfd, check_good_sample); in test_perf_branches_hw()
136 close(pfd); in test_perf_branches_hw()
147 int pfd; in test_perf_branches_no_hw() local
156 if (CHECK(pfd < 0, "perf_event_open", "err %d\n", pfd)) in test_perf_branches_no_hw()
159 test_perf_branches_common(pfd, check_bad_sample); in test_perf_branches_no_hw()
[all …]
A Dperf_link.c31 int pfd = -1, link_fd = -1, err; in serial_test_perf_link() local
43 pfd = syscall(__NR_perf_event_open, &attr, -1, 0, -1, PERF_FLAG_FD_CLOEXEC); in serial_test_perf_link()
44 if (!ASSERT_GE(pfd, 0, "perf_fd")) in serial_test_perf_link()
51 link_fd = bpf_link_create(bpf_program__fd(skel->progs.handler), pfd, in serial_test_perf_link()
87 if (pfd >= 0) in serial_test_perf_link()
88 close(pfd); in serial_test_perf_link()
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()
A Dbpf_cookie.c188 int pfd = -1; in pe_subtest() local
197 pfd = syscall(__NR_perf_event_open, &attr, -1, 0, -1, PERF_FLAG_FD_CLOEXEC); in pe_subtest()
198 if (!ASSERT_GE(pfd, 0, "perf_fd")) in pe_subtest()
202 link = bpf_program__attach_perf_event_opts(skel->progs.handle_pe, pfd, &opts); in pe_subtest()
221 link = bpf_program__attach_perf_event_opts(skel->progs.handle_pe, pfd, &opts); in pe_subtest()
230 close(pfd); in pe_subtest()
/linux/tools/testing/selftests/filesystems/epoll/
A Depoll_wakeup_test.c63 struct pollfd pfd; in waiter_entry1ap() local
90 struct pollfd pfd; in waiter_entry1op() local
117 struct pollfd pfd; in waiter_entry2ap() local
318 pfd.fd = efd; in TEST()
323 pfd.fd = efd; in TEST()
357 pfd.fd = efd; in TEST()
362 pfd.fd = efd; in TEST()
402 pfd.fd = efd; in TEST()
407 pfd.fd = efd; in TEST()
448 pfd.fd = efd; in TEST()
[all …]
/linux/tools/testing/selftests/nsfs/
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/net/
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()
234 pfd.revents = 0; in walk_v1_v2_rx()
265 poll(&pfd, 1, 1); in walk_v1_v2_rx()
410 memset(&pfd, 0, sizeof(pfd)); in walk_tx()
411 pfd.fd = sock; in walk_tx()
413 pfd.revents = 0; in walk_tx()
592 memset(&pfd, 0, sizeof(pfd)); in walk_v3_rx()
593 pfd.fd = sock; in walk_v3_rx()
[all …]
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()
A Dpsock_fanout.c160 int pfd; in sock_fanout_set_ebpf() local
171 pfd = syscall(__NR_bpf, BPF_PROG_LOAD, &attr, sizeof(attr)); in sock_fanout_set_ebpf()
172 if (pfd < 0) { in sock_fanout_set_ebpf()
178 if (setsockopt(fd, SOL_PACKET, PACKET_FANOUT_DATA, &pfd, sizeof(pfd))) { in sock_fanout_set_ebpf()
183 if (close(pfd)) { in sock_fanout_set_ebpf()
A Dmsg_zerocopy.c143 struct pollfd pfd; in do_poll() local
146 pfd.events = events; in do_poll()
147 pfd.revents = 0; in do_poll()
148 pfd.fd = fd; in do_poll()
150 ret = poll(&pfd, 1, cfg_waittime_ms); in do_poll()
154 return ret && (pfd.revents & events); in do_poll()
/linux/tools/gpio/
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/
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/sched/
A Dcs_prctl_test.c67 int pfd[2]; member
155 close(ca->pfd[0]); in child_func_process()
159 write(ca->pfd[1], &ca->thr_tids, sizeof(int) * ca->num_threads); in child_func_process()
160 close(ca->pfd[1]); in child_func_process()
177 if (pipe(proc[i].pfd) == -1) in create_processes()
183 close(proc[i].pfd[1]); in create_processes()
187 read(proc[i].pfd[0], &proc[i].thr_tids, sizeof(int) * proc[i].num_threads); in create_processes()
188 close(proc[i].pfd[0]); in create_processes()
/linux/samples/timers/
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/
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/tools/hv/
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/
A Dtest_lirc_mode2_user.c113 struct pollfd pfd = { .fd = inputfd, .events = POLLIN }; in main() local
117 poll(&pfd, 1, 100); in main()
140 poll(&pfd, 1, 100); in main()
A Dtest_flow_dissector.c477 struct pollfd pfd; in do_poll() local
480 pfd.fd = fd; in do_poll()
481 pfd.events = events; in do_poll()
483 ret = poll(&pfd, 1, timeout); in do_poll()
486 if (ret && !(pfd.revents & POLLIN)) in do_poll()
487 error(1, errno, "poll: unexpected event 0x%x\n", pfd.revents); in do_poll()
/linux/drivers/pinctrl/mediatek/
A Dpinctrl-mtk-common-v2.c74 int field, struct mtk_pin_field *pfd) in mtk_hw_pin_field_lookup() argument
131 pfd->index = c->i_base; in mtk_hw_pin_field_lookup()
132 pfd->offset = c->s_addr + c->x_addrs * (bits / c->sz_reg); in mtk_hw_pin_field_lookup()
133 pfd->bitpos = bits % c->sz_reg; in mtk_hw_pin_field_lookup()
134 pfd->mask = (1 << c->x_bits) - 1; in mtk_hw_pin_field_lookup()
140 pfd->next = pfd->bitpos + c->x_bits > c->sz_reg ? c->x_addrs : 0; in mtk_hw_pin_field_lookup()
147 int field, struct mtk_pin_field *pfd) in mtk_hw_pin_field_get() argument
154 return mtk_hw_pin_field_lookup(hw, desc, field, pfd); in mtk_hw_pin_field_get()
/linux/Documentation/networking/
A Dpacket_mmap.rst490 struct pollfd pfd;
492 pfd.fd = fd;
493 pfd.revents = 0;
534 struct pollfd pfd;
535 pfd.fd = fd;
536 pfd.revents = 0;
537 pfd.events = POLLOUT;
954 struct pollfd pfd;
970 memset(&pfd, 0, sizeof(pfd));
971 pfd.fd = fd;
[all …]
/linux/tools/testing/selftests/ir/
A Dir_loopback.c167 struct pollfd pfd = { .fd = rlircfd, .events = POLLIN }; in main() local
170 poll(&pfd, 1, 1000); in main()
/linux/tools/lib/bpf/
A Dlibbpf.c6480 *pfd = -1; in load_program()
6518 *pfd = ret; in load_program()
9611 return pfd; in perf_event_open_probe()
9704 return pfd; in perf_event_kprobe_open_legacy()
9718 int pfd, err; in bpf_program__attach_kprobe_opts() local
9756 close(pfd); in bpf_program__attach_kprobe_opts()
9898 return pfd; in perf_event_uprobe_open_legacy()
9910 int pfd, err; in bpf_program__attach_uprobe_opts() local
9952 close(pfd); in bpf_program__attach_uprobe_opts()
10030 return pfd; in perf_event_open_tracepoint()
[all …]

Completed in 66 milliseconds

12