/linux-6.6.21/tools/testing/selftests/bpf/progs/ |
D | test_vmlinux.c | 22 long tv_nsec; in handle__tp() local 28 if (bpf_probe_read_user(&tv_nsec, sizeof(ts->tv_nsec), &ts->tv_nsec) || in handle__tp() 29 tv_nsec != MY_TV_NSEC) in handle__tp() 40 long tv_nsec; in BPF_PROG() local 46 if (bpf_probe_read_user(&tv_nsec, sizeof(ts->tv_nsec), &ts->tv_nsec) || in BPF_PROG() 47 tv_nsec != MY_TV_NSEC) in BPF_PROG() 58 long tv_nsec; in BPF_PROG() local 64 if (bpf_probe_read_user(&tv_nsec, sizeof(ts->tv_nsec), &ts->tv_nsec) || in BPF_PROG() 65 tv_nsec != MY_TV_NSEC) in BPF_PROG()
|
/linux-6.6.21/fs/ |
D | utimes.c | 28 if (!nsec_valid(times[0].tv_nsec) || in vfs_utimes() 29 !nsec_valid(times[1].tv_nsec)) in vfs_utimes() 31 if (times[0].tv_nsec == UTIME_NOW && in vfs_utimes() 32 times[1].tv_nsec == UTIME_NOW) in vfs_utimes() 42 if (times[0].tv_nsec == UTIME_OMIT) in vfs_utimes() 44 else if (times[0].tv_nsec != UTIME_NOW) { in vfs_utimes() 49 if (times[1].tv_nsec == UTIME_OMIT) in vfs_utimes() 51 else if (times[1].tv_nsec != UTIME_NOW) { in vfs_utimes() 159 if (tstimes[0].tv_nsec == UTIME_OMIT && in SYSCALL_DEFINE4() 160 tstimes[1].tv_nsec == UTIME_OMIT) in SYSCALL_DEFINE4() [all …]
|
/linux-6.6.21/fs/ext4/ |
D | inode-test.c | 89 .expected = {.tv_sec = -0x80000000LL, .tv_nsec = 0L}, 97 .expected = {.tv_sec = -1LL, .tv_nsec = 0L}, 113 .expected = {.tv_sec = 0x7fffffffLL, .tv_nsec = 0L}, 121 .expected = {.tv_sec = 0x80000000LL, .tv_nsec = 0L}, 129 .expected = {.tv_sec = 0xffffffffLL, .tv_nsec = 0L}, 137 .expected = {.tv_sec = 0x100000000LL, .tv_nsec = 0L}, 145 .expected = {.tv_sec = 0x17fffffffLL, .tv_nsec = 0L}, 153 .expected = {.tv_sec = 0x180000000LL, .tv_nsec = 0L}, 161 .expected = {.tv_sec = 0x1ffffffffLL, .tv_nsec = 0L}, 169 .expected = {.tv_sec = 0x200000000LL, .tv_nsec = 0L}, [all …]
|
/linux-6.6.21/include/linux/ |
D | time64.h | 15 long tv_nsec; /* nanoseconds */ member 49 return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec); in timespec64_equal() 63 return lhs->tv_nsec - rhs->tv_nsec; in timespec64_compare() 73 lhs.tv_nsec + rhs.tv_nsec); in timespec64_add() 85 lhs.tv_nsec - rhs.tv_nsec); in timespec64_sub() 98 if ((unsigned long)ts->tv_nsec >= NSEC_PER_SEC) in timespec64_valid() 139 return ((s64) ts->tv_sec * NSEC_PER_SEC) + ts->tv_nsec; in timespec64_to_ns() 160 a->tv_sec += __iter_div_u64_rem(a->tv_nsec + ns, NSEC_PER_SEC, &ns); in timespec64_add_ns() 161 a->tv_nsec = ns; in timespec64_add_ns()
|
/linux-6.6.21/fs/fat/ |
D | fat_test.c | 35 .ts = {.tv_sec = 315532800LL, .tv_nsec = 0L}, 43 .ts = {.tv_sec = 4354819198LL, .tv_nsec = 0L}, 51 .ts = {.tv_sec = 315493200LL, .tv_nsec = 0L}, 59 .ts = {.tv_sec = 4354858798LL, .tv_nsec = 0L}, 67 .ts = {.tv_sec = 825552000LL, .tv_nsec = 0L}, 75 .ts = {.tv_sec = 951782400LL, .tv_nsec = 0L}, 83 .ts = {.tv_sec = 4107542400LL, .tv_nsec = 0L}, 91 .ts = {.tv_sec = 1078014600LL, .tv_nsec = 0L}, 99 .ts = {.tv_sec = 1078097400LL, .tv_nsec = 0L}, 107 .ts = {.tv_sec = 946684799LL, .tv_nsec = 0L}, [all …]
|
/linux-6.6.21/kernel/time/ |
D | time.c | 89 tv.tv_nsec = 0; in SYSCALL_DEFINE1() 127 tv.tv_nsec = 0; in SYSCALL_DEFINE1() 148 put_user(ts.tv_nsec / 1000, &tv->tv_usec)) in SYSCALL_DEFINE2() 207 get_user(new_ts.tv_nsec, &tv->tv_usec)) in SYSCALL_DEFINE2() 210 if (new_ts.tv_nsec > USEC_PER_SEC || new_ts.tv_nsec < 0) in SYSCALL_DEFINE2() 213 new_ts.tv_nsec *= NSEC_PER_USEC; in SYSCALL_DEFINE2() 232 put_user(ts.tv_nsec / 1000, &tv->tv_usec)) in COMPAT_SYSCALL_DEFINE2() 251 get_user(new_ts.tv_nsec, &tv->tv_usec)) in COMPAT_SYSCALL_DEFINE2() 254 if (new_ts.tv_nsec > USEC_PER_SEC || new_ts.tv_nsec < 0) in COMPAT_SYSCALL_DEFINE2() 257 new_ts.tv_nsec *= NSEC_PER_USEC; in COMPAT_SYSCALL_DEFINE2() [all …]
|
D | itimer.c | 106 v.it_interval.tv_usec = i->it_interval.tv_nsec / NSEC_PER_USEC; in put_itimerval() 108 v.it_value.tv_usec = i->it_value.tv_nsec / NSEC_PER_USEC; in put_itimerval() 135 v32.it_interval.tv_usec = i->it_interval.tv_nsec / NSEC_PER_USEC; in put_old_itimerval32() 137 v32.it_value.tv_usec = i->it_value.tv_nsec / NSEC_PER_USEC; in put_old_itimerval32() 286 it_new.it_value.tv_nsec = 0; in alarm_setitimer() 287 it_new.it_interval.tv_sec = it_new.it_interval.tv_nsec = 0; in alarm_setitimer() 295 if ((!it_old.it_value.tv_sec && it_old.it_value.tv_nsec) || in alarm_setitimer() 296 it_old.it_value.tv_nsec >= (NSEC_PER_SEC / 2)) in alarm_setitimer() 326 o->it_interval.tv_nsec = v.it_interval.tv_usec * NSEC_PER_USEC; in get_itimerval() 328 o->it_value.tv_nsec = v.it_value.tv_usec * NSEC_PER_USEC; in get_itimerval() [all …]
|
/linux-6.6.21/tools/testing/selftests/mqueue/ |
D | mq_perf_tests.c | 359 (middle.tv_nsec - start.tv_nsec); \ 360 send_total.tv_nsec += nsec; \ 361 if (send_total.tv_nsec >= 1000000000) { \ 363 send_total.tv_nsec -= 1000000000; \ 366 (end.tv_nsec - middle.tv_nsec); \ 367 recv_total.tv_nsec += nsec; \ 368 if (recv_total.tv_nsec >= 1000000000) { \ 370 recv_total.tv_nsec -= 1000000000; \ 449 printf("\t\tClock resolution:\t\t%lu nsec%s\n", res.tv_nsec, in perf_test_thread() 450 res.tv_nsec > 1 ? "s" : ""); in perf_test_thread() [all …]
|
/linux-6.6.21/tools/testing/selftests/kvm/ |
D | dirty_log_perf_test.c | 106 ts_diff.tv_nsec); in vcpu_worker() 110 ts_diff.tv_nsec); in vcpu_worker() 125 total.tv_sec, total.tv_nsec, avg.tv_sec, avg.tv_nsec); in vcpu_worker() 205 ts_diff.tv_sec, ts_diff.tv_nsec); in run_test() 212 ts_diff.tv_sec, ts_diff.tv_nsec); in run_test() 235 iteration, ts_diff.tv_sec, ts_diff.tv_nsec); in run_test() 243 iteration, ts_diff.tv_sec, ts_diff.tv_nsec); in run_test() 253 iteration, ts_diff.tv_sec, ts_diff.tv_nsec); in run_test() 270 ts_diff.tv_sec, ts_diff.tv_nsec); in run_test() 283 get_dirty_log_total.tv_nsec, avg.tv_sec, avg.tv_nsec); in run_test() [all …]
|
/linux-6.6.21/sound/core/seq/ |
D | seq_timer.h | 77 if ((a->tv_sec == b->tv_sec) && (a->tv_nsec >= b->tv_nsec)) in snd_seq_compare_real_time() 85 while (tm->tv_nsec >= 1000000000) { in snd_seq_sanity_real_time() 87 tm->tv_nsec -= 1000000000; in snd_seq_sanity_real_time() 97 tm->tv_nsec += inc->tv_nsec; in snd_seq_inc_real_time() 103 tm->tv_nsec += nsec; in snd_seq_inc_time_nsec()
|
/linux-6.6.21/tools/testing/radix-tree/ |
D | benchmark.c | 39 (finish.tv_nsec - start.tv_nsec); in benchmark_iter() 67 (finish.tv_nsec - start.tv_nsec); in benchmark_insert() 88 (finish.tv_nsec - start.tv_nsec); in benchmark_tagging() 109 (finish.tv_nsec - start.tv_nsec); in benchmark_delete()
|
/linux-6.6.21/arch/um/os-Linux/ |
D | time.c | 23 return ((long long) ts->tv_sec * UM_NSEC_PER_SEC) + ts->tv_nsec; in timespec_to_ns() 52 its.it_value.tv_nsec = nsecs % UM_NSEC_PER_SEC; in os_timer_set_interval() 55 its.it_interval.tv_nsec = nsecs % UM_NSEC_PER_SEC; in os_timer_set_interval() 67 .it_value.tv_nsec = nsecs % UM_NSEC_PER_SEC, in os_timer_one_shot() 70 .it_interval.tv_nsec = 0, // we cheat here in os_timer_one_shot() 111 if (its.it_value.tv_sec || its.it_value.tv_nsec) in os_idle_sleep()
|
/linux-6.6.21/tools/testing/selftests/timers/ |
D | nanosleep.c | 86 if (a.tv_nsec > b.tv_nsec) in in_order() 93 ts.tv_nsec += ns; in timespec_add() 94 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add() 95 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add() 120 rel.tv_nsec = 0; in nanosleep_test()
|
D | leap-a-day.c | 66 if (a.tv_nsec > b.tv_nsec) in in_order() 73 ts.tv_nsec += ns; in timespec_add() 74 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add() 75 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add() 301 its1.it_value.tv_nsec = 0; in main() 303 its1.it_interval.tv_nsec = 0; in main() 308 ts.tv_nsec = 0; in main() 341 tai.tv_nsec, in main() 356 ts.tv_nsec = NSEC_PER_SEC / 2; in main()
|
D | mqueue-lat.c | 42 long long ret = NSEC_PER_SEC * b.tv_sec + b.tv_nsec; in timespec_sub() 44 ret -= NSEC_PER_SEC * a.tv_sec + a.tv_nsec; in timespec_sub() 50 ts.tv_nsec += ns; in timespec_add() 51 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add() 52 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add()
|
D | nsleep-lat.c | 81 ts.tv_nsec += ns; in timespec_add() 82 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add() 83 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add() 92 long long ret = NSEC_PER_SEC * b.tv_sec + b.tv_nsec; in timespec_sub() 94 ret -= NSEC_PER_SEC * a.tv_sec + a.tv_nsec; in timespec_sub() 105 target.tv_nsec = ns%NSEC_PER_SEC; in nanosleep_lat_test()
|
D | alarmtimer-suspend.c | 89 long long ret = NSEC_PER_SEC * b.tv_sec + b.tv_nsec; in timespec_sub() 91 ret -= NSEC_PER_SEC * a.tv_sec + a.tv_nsec; in timespec_sub() 109 ts.tv_nsec, delta_ns); in sigalarm() 152 start_time.tv_sec, start_time.tv_nsec); in main() 157 its1.it_interval.tv_nsec = 0; in main()
|
D | inconsistency-check.c | 87 if (a.tv_nsec > b.tv_nsec) in in_order() 130 list[i].tv_nsec); in consistency_test() 135 delta += list[inconsistent].tv_nsec; in consistency_test() 137 delta -= list[inconsistent+1].tv_nsec; in consistency_test()
|
/linux-6.6.21/drivers/input/misc/ |
D | hp_sdc_rtc.c | 194 res->tv_nsec = (long)(tenms % 100) * 10000 * 1000; in hp_sdc_rtc_read_rt() 211 res->tv_nsec = (long)(tenms % 100) * 10000 * 1000; in hp_sdc_rtc_read_fhs() 228 res->tv_nsec = (long)(tenms % 100) * 10000 * 1000; in hp_sdc_rtc_read_mt() 245 res->tv_nsec = (long)(tenms % 100) * 10000 * 1000; in hp_sdc_rtc_read_dt() 262 res->tv_nsec = (long)(tenms % 100) * 10000 * 1000; in hp_sdc_rtc_read_ct() 291 (s64)tv.tv_sec, (long)tv.tv_nsec/1000000L); in hp_sdc_rtc_proc_show() 298 (s64)tv.tv_sec, (long)tv.tv_nsec/1000000L); in hp_sdc_rtc_proc_show() 305 (s64)tv.tv_sec, (long)tv.tv_nsec/1000000L); in hp_sdc_rtc_proc_show() 312 (s64)tv.tv_sec, (long)tv.tv_nsec/1000000L); in hp_sdc_rtc_proc_show() 319 (s64)tv.tv_sec, (long)tv.tv_nsec/1000000L); in hp_sdc_rtc_proc_show()
|
/linux-6.6.21/tools/testing/selftests/timens/ |
D | futex.c | 30 timeout.tv_nsec += NSEC_PER_SEC / 10; // 100ms in run_test() 31 if (timeout.tv_nsec > NSEC_PER_SEC) { in run_test() 33 timeout.tv_nsec -= NSEC_PER_SEC; in run_test() 51 (end.tv_sec == timeout.tv_sec && end.tv_nsec < timeout.tv_nsec)) { in run_test()
|
/linux-6.6.21/fs/udf/ |
D | udftime.c | 49 dest->tv_nsec = 1000 * (src.centiseconds * 10000 + in udf_disk_stamp_to_time() 55 dest->tv_nsec %= NSEC_PER_SEC; in udf_disk_stamp_to_time() 77 dest->centiseconds = ts.tv_nsec / 10000000; in udf_time_to_disk_stamp() 78 dest->hundredsOfMicroseconds = (ts.tv_nsec / 1000 - in udf_time_to_disk_stamp() 80 dest->microseconds = (ts.tv_nsec / 1000 - dest->centiseconds * 10000 - in udf_time_to_disk_stamp()
|
/linux-6.6.21/tools/testing/selftests/vDSO/ |
D | vdso_test_correctness.c | 42 long long tv_nsec; member 222 return a->tv_nsec <= b->tv_nsec; in ts_leq() 231 return a->tv_nsec <= b->tv_nsec; in ts64_leq() 290 (unsigned long long)start.tv_sec, start.tv_nsec, in test_one_clock_gettime() 291 (unsigned long long)vdso.tv_sec, vdso.tv_nsec, in test_one_clock_gettime() 292 (unsigned long long)end.tv_sec, end.tv_nsec); in test_one_clock_gettime() 352 (unsigned long long)start.tv_sec, start.tv_nsec, in test_one_clock_gettime64() 353 (unsigned long long)vdso.tv_sec, vdso.tv_nsec, in test_one_clock_gettime64() 354 (unsigned long long)end.tv_sec, end.tv_nsec); in test_one_clock_gettime64()
|
/linux-6.6.21/tools/testing/selftests/cgroup/ |
D | test_cpu.c | 110 .tv_nsec = 0, in timespec_sub() 119 if (lhs->tv_nsec < rhs->tv_nsec) { in timespec_sub() 124 ret.tv_nsec = NSEC_PER_SEC - rhs->tv_nsec + lhs->tv_nsec; in timespec_sub() 126 ret.tv_nsec = lhs->tv_nsec - rhs->tv_nsec; in timespec_sub() 152 while (ts_remaining.tv_sec > 0 || ts_remaining.tv_nsec > 0) { in hog_cpus_timed() 208 .tv_nsec = 0, in test_cpucg_stats() 308 .tv_nsec = 0, in weight_hog_ncpus() 470 .tv_nsec = 0, in run_cpucg_nested_weight_test() 593 .tv_nsec = 0, in test_cpucg_max() 653 .tv_nsec = 0, in test_cpucg_max_nested()
|
/linux-6.6.21/fs/coda/ |
D | coda_linux.c | 73 .tv_nsec = ts.tv_nsec, in coda_to_timespec64() 83 .tv_nsec = ts64.tv_nsec, in timespec64_to_coda() 153 vattr->va_atime.tv_nsec = (long) -1; in coda_iattr_to_vattr() 155 vattr->va_mtime.tv_nsec = (long) -1; in coda_iattr_to_vattr() 157 vattr->va_ctime.tv_nsec = (long) -1; in coda_iattr_to_vattr()
|
/linux-6.6.21/tools/testing/selftests/futex/functional/ |
D | futex_wait_wouldblock.c | 42 struct timespec to = {.tv_sec = 0, .tv_nsec = timeout_ns}; in main() 91 to.tv_nsec += timeout_ns; in main() 93 if (to.tv_nsec >= 1000000000) { in main() 95 to.tv_nsec -= 1000000000; in main()
|