| /tools/testing/selftests/kvm/arm64/ |
| A D | arch_timer_edge_cases.c | 54 enum arch_timer timer; member 148 enum arch_timer timer; in guest_irq_handler() local 159 timer = PHYSICAL; in guest_irq_handler() 161 timer = VIRTUAL; in guest_irq_handler() 530 timer_set_cval(timer, in timers_sanity_checks() 541 GUEST_ASSERT(timer_get_cval(timer) < timer_get_cntct(timer)); in timers_sanity_checks() 546 timer_set_cval(timer, in timers_sanity_checks() 557 timer_set_cval(timer, in timers_sanity_checks() 574 sleep_poll(timer, 1); in timers_sanity_checks() 595 set_cval_irq(timer, in test_set_cnt_after_tval_max() [all …]
|
| /tools/testing/selftests/kvm/include/arm64/ |
| A D | arch_timer.h | 38 switch (timer) { in timer_get_cntct() 44 GUEST_FAIL("Unexpected timer type = %u", timer); in timer_get_cntct() 53 switch (timer) { in timer_set_cval() 69 switch (timer) { in timer_get_cval() 84 switch (timer) { in timer_set_tval() 101 switch (timer) { in timer_get_tval() 116 switch (timer) { in timer_set_ctl() 132 switch (timer) { in timer_get_ctl() 147 uint64_t now_ct = timer_get_cntct(timer); in timer_set_next_cval_ms() 150 timer_set_cval(timer, next_ct); in timer_set_next_cval_ms() [all …]
|
| A D | delay.h | 13 enum arch_timer timer = VIRTUAL; in __delay() local 14 uint64_t start = timer_get_cntct(timer); in __delay() 16 while ((timer_get_cntct(timer) - start) < cycles) in __delay()
|
| /tools/testing/selftests/bpf/progs/ |
| A D | timer_lockup.c | 35 struct bpf_timer *timer; in timer_cb1() local 39 if (timer) in timer_cb1() 40 timer2_err = bpf_timer_cancel(timer); in timer_cb1() 47 struct bpf_timer *timer; in timer_cb2() local 51 if (timer) in timer_cb2() 52 timer1_err = bpf_timer_cancel(timer); in timer_cb2() 60 struct bpf_timer *timer; in timer1_prog() local 64 if (timer) { in timer1_prog() 66 bpf_timer_set_callback(timer, timer_cb1); in timer1_prog() 76 struct bpf_timer *timer; in timer2_prog() local [all …]
|
| A D | timer.c | 13 struct bpf_timer timer; member 176 bpf_timer_start(&val->timer, 1000, 0); in timer_cb2() 321 struct bpf_timer *timer; in BPF_PROG2() local 326 if (timer) { in BPF_PROG2() 353 struct bpf_timer *timer; in test_pinned_timer() local 367 if (timer) { in test_pinned_timer() 398 bpf_timer_start(timer, 1000000, 0); in race_timer_callback() 405 struct bpf_timer *timer; in race() local 413 if (!timer) in race() 421 bpf_timer_start(timer, 0, 0); in race() [all …]
|
| A D | test_helper_restricted.c | 6 struct timer { struct 18 __type(value, struct timer); 28 static int timer_cb(void *map, int *key, struct timer *timer) in timer_cb() argument 35 struct timer *timer; in timer_work() local 38 timer = bpf_map_lookup_elem(&timers, &key); in timer_work() 39 if (timer) { in timer_work() 40 bpf_timer_init(&timer->t, &timers, CLOCK_MONOTONIC); in timer_work() 41 bpf_timer_set_callback(&timer->t, timer_cb); in timer_work() 42 bpf_timer_start(&timer->t, 10E9, 0); in timer_work() 43 bpf_timer_cancel(&timer->t); in timer_work()
|
| A D | timer_failure.c | 58 struct bpf_timer *timer; in __flag() local 60 timer = bpf_map_lookup_elem(&timer_map, &key); in __flag() 61 if (timer) { in __flag() 62 bpf_timer_init(timer, &timer_map, CLOCK_BOOTTIME); in __flag() 63 bpf_timer_set_callback(timer, timer_cb_ret_bad); in __flag() 64 bpf_timer_start(timer, 1000, 0); in __flag()
|
| A D | timer_mim.c | 12 struct bpf_timer timer; member 44 bpf_timer_set_callback(&val->timer, timer_cb1); in timer_cb2() 45 if (bpf_timer_start(&val->timer, 1000, 0)) in timer_cb2() 55 bpf_timer_set_callback(&val->timer, timer_cb2); in timer_cb1() 56 if (bpf_timer_start(&val->timer, 1000, 0)) in timer_cb1() 82 bpf_timer_init(&val->timer, inner_map, CLOCK_MONOTONIC); in BPF_PROG() 83 if (bpf_timer_set_callback(&val->timer, timer_cb1)) in BPF_PROG() 85 if (bpf_timer_start(&val->timer, 0, 0)) in BPF_PROG()
|
| A D | async_stack_depth.c | 8 struct bpf_timer timer; member 19 static int timer_cb(void *map, int *key, struct bpf_timer *timer) in timer_cb() argument 26 static int bad_timer_cb(void *map, int *key, struct bpf_timer *timer) in bad_timer_cb() argument 44 return bpf_timer_set_callback(&elem->timer, timer_cb) + buf[0]; in pseudo_call_check() 58 return bpf_timer_set_callback(&elem->timer, bad_timer_cb) + buf[0]; in async_call_root_check()
|
| A D | free_timer.c | 11 struct bpf_timer timer; member 39 bpf_timer_init(&value->timer, &map, CLOCK_MONOTONIC); in start_cb() 40 bpf_timer_set_callback(&value->timer, timer_cb); in start_cb() 42 bpf_timer_start(&value->timer, 100000, BPF_F_TIMER_CPU_PIN); in start_cb()
|
| A D | timer_mim_reject.c | 12 struct bpf_timer timer; member 68 bpf_timer_init(&val->timer, inner_map2, CLOCK_MONOTONIC); in BPF_PROG() 69 if (bpf_timer_set_callback(&val->timer, timer_cb)) in BPF_PROG() 71 if (bpf_timer_start(&val->timer, 0, 0)) in BPF_PROG()
|
| A D | timer_crash.c | 8 struct bpf_timer timer; member 49 bpf_timer_cancel(&e->timer); in sys_enter()
|
| A D | test_vmlinux.c | 73 int BPF_KPROBE(handle__kprobe, struct hrtimer *timer, ktime_t tim, u64 delta_ns, in BPF_KPROBE() argument 82 int BPF_PROG(handle__fentry, struct hrtimer *timer, ktime_t tim, u64 delta_ns, in BPF_PROG() argument
|
| A D | verifier_helper_restricted.c | 20 struct timer { struct 28 __type(value, struct timer);
|
| A D | exceptions_fail.c | 19 struct bpf_timer timer; member 89 static int timer_cb(void *map, int *key, struct bpf_timer *timer) in timer_cb() argument 104 return bpf_timer_set_callback(&elem->timer, timer_cb); in reject_async_callback_throw()
|
| /tools/testing/selftests/kvm/x86/ |
| A D | vmx_exception_with_invalid_guest_state.c | 48 struct itimerval timer; in set_timer() local 50 timer.it_value.tv_sec = 0; in set_timer() 51 timer.it_value.tv_usec = 200; in set_timer() 52 timer.it_interval = timer.it_value; in set_timer() 53 TEST_ASSERT_EQ(setitimer(ITIMER_REAL, &timer, NULL), 0); in set_timer()
|
| A D | xen_shinfo_test.c | 579 .u.timer.port = EVTCHN_TIMER, in main() 580 .u.timer.priority = KVM_IRQ_ROUTING_XEN_EVTCHN_PRIO_2LEVEL, in main() 581 .u.timer.expires_ns = 0 in main() 795 TEST_ASSERT(tmr.u.timer.port == EVTCHN_TIMER, in main() 799 TEST_ASSERT(tmr.u.timer.expires_ns > rs->state_entry_time, in main() 813 tmr.u.timer.expires_ns = rs->state_entry_time + 100000000; in main() 840 tmr.u.timer.expires_ns = rs->state_entry_time + 100000000; in main() 855 tmr.u.timer.expires_ns = 0; in main() 921 tmr.u.timer.expires_ns = rs->state_entry_time + in main() 937 if (tmr.u.timer.expires_ns) in main() [all …]
|
| /tools/sched_ext/ |
| A D | scx_central.bpf.c | 80 struct bpf_timer timer; member 254 static int central_timerfn(void *map, int *key, struct bpf_timer *timer) in central_timerfn() argument 292 bpf_timer_start(timer, TIMER_INTERVAL_NS, BPF_F_TIMER_CPU_PIN); in central_timerfn() 300 struct bpf_timer *timer; in BPF_STRUCT_OPS_SLEEPABLE() local 307 timer = bpf_map_lookup_elem(¢ral_timer, &key); in BPF_STRUCT_OPS_SLEEPABLE() 308 if (!timer) in BPF_STRUCT_OPS_SLEEPABLE() 316 bpf_timer_init(timer, ¢ral_timer, CLOCK_MONOTONIC); in BPF_STRUCT_OPS_SLEEPABLE() 317 bpf_timer_set_callback(timer, central_timerfn); in BPF_STRUCT_OPS_SLEEPABLE() 319 ret = bpf_timer_start(timer, TIMER_INTERVAL_NS, BPF_F_TIMER_CPU_PIN); in BPF_STRUCT_OPS_SLEEPABLE() 329 ret = bpf_timer_start(timer, TIMER_INTERVAL_NS, 0); in BPF_STRUCT_OPS_SLEEPABLE()
|
| A D | scx_qmap.bpf.c | 692 struct bpf_timer timer; member 784 static int monitor_timerfn(void *map, int *key, struct bpf_timer *timer) in monitor_timerfn() argument 816 bpf_timer_start(timer, ONE_SEC_IN_NS, 0); in monitor_timerfn() 823 struct bpf_timer *timer; in BPF_STRUCT_OPS_SLEEPABLE() local 836 timer = bpf_map_lookup_elem(&monitor_timer, &key); in BPF_STRUCT_OPS_SLEEPABLE() 837 if (!timer) in BPF_STRUCT_OPS_SLEEPABLE() 840 bpf_timer_init(timer, &monitor_timer, CLOCK_MONOTONIC); in BPF_STRUCT_OPS_SLEEPABLE() 841 bpf_timer_set_callback(timer, monitor_timerfn); in BPF_STRUCT_OPS_SLEEPABLE() 843 return bpf_timer_start(timer, ONE_SEC_IN_NS, 0); in BPF_STRUCT_OPS_SLEEPABLE()
|
| /tools/testing/selftests/bpf/prog_tests/ |
| A D | timer.c | 24 static int timer(struct timer *timer_skel) in timer() function 85 struct timer *timer_skel = NULL; in serial_test_timer() 92 err = timer(timer_skel); in serial_test_timer()
|
| /tools/testing/selftests/alsa/ |
| A D | .gitignore | 1 global-timer
|
| /tools/testing/selftests/timens/ |
| A D | .gitignore | 9 timer
|
| A D | Makefile | 1 TEST_GEN_PROGS := timens timerfd timer clock_nanosleep procfs exec futex vfork_exec
|
| /tools/testing/selftests/drivers/net/netdevsim/ |
| A D | nexthop.sh | 462 local timer=$1; shift 469 $IP nexthop add id 10 group 1/2 type resilient buckets 8 $timer 4 477 $IP nexthop replace id 10 group 1/2,3 type resilient $timer 8 490 log_test "Bucket migration after $timer increase" 497 local timer=$1; shift 512 $IP nexthop replace id 10 group 1/2,3 type resilient $timer 4 519 log_test "Bucket migration after $timer decrease" 526 local timer=$1; shift 535 type resilient buckets 8 $timer 4 543 $IP nexthop replace id 10 group 1/2,3 type resilient $timer 8 [all …]
|
| /tools/testing/selftests/timers/ |
| A D | .gitignore | 16 set-timer-lat
|