Home
last modified time | relevance | path

Searched refs:NSEC_PER_SEC (Results 1 – 25 of 395) sorted by relevance

12345678910>>...16

/linux-6.3-rc2/tools/testing/selftests/timers/
A Dvalid-adjtimex.c37 #define NSEC_PER_SEC 1000000000LL macro
210 tmx.time.tv_usec += NSEC_PER_SEC; in set_offset()
257 if (set_offset(NSEC_PER_SEC - 1, 1)) in validate_set_offset()
260 if (set_offset(-NSEC_PER_SEC + 1, 1)) in validate_set_offset()
263 if (set_offset(-NSEC_PER_SEC - 1, 1)) in validate_set_offset()
266 if (set_offset(5 * NSEC_PER_SEC, 1)) in validate_set_offset()
269 if (set_offset(-5 * NSEC_PER_SEC, 1)) in validate_set_offset()
272 if (set_offset(5 * NSEC_PER_SEC + NSEC_PER_SEC / 2, 1)) in validate_set_offset()
275 if (set_offset(-5 * NSEC_PER_SEC - NSEC_PER_SEC / 2, 1)) in validate_set_offset()
308 if (set_bad_offset(0, NSEC_PER_SEC, 1)) in validate_set_offset()
[all …]
A Dnsleep-lat.c29 #define NSEC_PER_SEC 1000000000ULL macro
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()
104 target.tv_sec = ns/NSEC_PER_SEC; in nanosleep_lat_test()
105 target.tv_nsec = ns%NSEC_PER_SEC; in nanosleep_lat_test()
161 while (length <= (NSEC_PER_SEC * 10)) { in main()
A Dmqueue-lat.c34 #define NSEC_PER_SEC 1000000000ULL macro
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()
51 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add()
52 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add()
A Dalarmtimer-suspend.c48 #define NSEC_PER_SEC 1000000000ULL macro
49 #define UNREASONABLE_LAT (NSEC_PER_SEC * 5) /* hopefully we resume in 5 secs */
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()
106 delta_ns -= NSEC_PER_SEC * SUSPEND_SECS * alarmcount; in sigalarm()
A Draw_skew.c31 #define NSEC_PER_SEC 1000000000LL macro
48 return ts.tv_sec * NSEC_PER_SEC + ts.tv_nsec; in ts_to_nsec()
55 ts.tv_sec = ns/NSEC_PER_SEC; in nsec_to_ts()
56 ts.tv_nsec = ns%NSEC_PER_SEC; in nsec_to_ts()
127 eppm = ((delta2-delta1)*NSEC_PER_SEC)/interval; in main()
A Dnanosleep.c32 #define NSEC_PER_SEC 1000000000ULL macro
94 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add()
95 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add()
152 while (length <= (NSEC_PER_SEC * 10)) { in main()
A Dadjtick.c30 #define NSEC_PER_SEC 1000000000LL macro
46 return ts.tv_sec * NSEC_PER_SEC + ts.tv_nsec; in ts_to_nsec()
53 ts.tv_sec = ns/NSEC_PER_SEC; in nsec_to_ts()
54 ts.tv_nsec = ns%NSEC_PER_SEC; in nsec_to_ts()
/linux-6.3-rc2/include/linux/
A Dacct.h69 #if (TICK_NSEC % (NSEC_PER_SEC / AHZ)) == 0 in jiffies_to_AHZ()
77 do_div(tmp, (NSEC_PER_SEC / AHZ)); in jiffies_to_AHZ()
84 #if (NSEC_PER_SEC % AHZ) == 0 in nsec_to_AHZ()
85 do_div(x, (NSEC_PER_SEC / AHZ)); in nsec_to_AHZ()
88 do_div(x, (NSEC_PER_SEC / 512)); in nsec_to_AHZ()
96 do_div(x, (unsigned long)((9ull * NSEC_PER_SEC + (AHZ/2)) in nsec_to_AHZ()
A Dtime64.h32 #define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC)
33 #define KTIME_SEC_MIN (KTIME_MIN / NSEC_PER_SEC)
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()
/linux-6.3-rc2/kernel/time/
A Dtime.c480 while (nsec >= NSEC_PER_SEC) { in set_normalized_timespec64()
487 nsec -= NSEC_PER_SEC; in set_normalized_timespec64()
492 nsec += NSEC_PER_SEC; in set_normalized_timespec64()
521 ts.tv_nsec = NSEC_PER_SEC - rem - 1; in ns_to_timespec64()
613 NSEC_PER_SEC, &rem); in jiffies_to_timespec64()
676 #if (NSEC_PER_SEC % USER_HZ) == 0 in nsec_to_clock_t()
677 return div_u64(x, NSEC_PER_SEC / USER_HZ); in nsec_to_clock_t()
692 #if !(NSEC_PER_SEC % HZ) in jiffies64_to_nsecs()
693 return (NSEC_PER_SEC / HZ) * j; in jiffies64_to_nsecs()
725 #if (NSEC_PER_SEC % HZ) == 0 in nsecs_to_jiffies64()
[all …]
A Dvsyscall.c39 while (nsec >= (((u64)NSEC_PER_SEC) << tk->tkr_mono.shift)) { in update_vdso_data()
40 nsec -= (((u64)NSEC_PER_SEC) << tk->tkr_mono.shift); in update_vdso_data()
55 while (nsec >= (((u64)NSEC_PER_SEC) << tk->tkr_mono.shift)) { in update_vdso_data()
56 nsec -= (((u64)NSEC_PER_SEC) << tk->tkr_mono.shift); in update_vdso_data()
101 vdso_ts->sec += __iter_div_u64_rem(nsec, NSEC_PER_SEC, &vdso_ts->nsec); in update_vsyscall()
/linux-6.3-rc2/tools/testing/selftests/mm/
A Dksm_tests.c522 printf("Total time: %ld.%09ld s\n", scan_time_ns / NSEC_PER_SEC, in ksm_merge_hugepages_time()
523 scan_time_ns % NSEC_PER_SEC); in ksm_merge_hugepages_time()
525 ((double)scan_time_ns / NSEC_PER_SEC)); in ksm_merge_hugepages_time()
564 scan_time_ns % NSEC_PER_SEC); in ksm_merge_time()
566 ((double)scan_time_ns / NSEC_PER_SEC)); in ksm_merge_time()
611 scan_time_ns % NSEC_PER_SEC); in ksm_unmerge_time()
613 ((double)scan_time_ns / NSEC_PER_SEC)); in ksm_unmerge_time()
654 cow_time_ns % NSEC_PER_SEC); in ksm_cow_time()
656 ((double)cow_time_ns / NSEC_PER_SEC)); in ksm_cow_time()
682 cow_time_ns % NSEC_PER_SEC); in ksm_cow_time()
[all …]
/linux-6.3-rc2/tools/testing/radix-tree/
A Dbenchmark.c12 #define NSEC_PER_SEC 1000000000L macro
38 nsec = (finish.tv_sec - start.tv_sec) * NSEC_PER_SEC + in benchmark_iter()
42 if (loops == 1 && nsec * 5 < NSEC_PER_SEC) { in benchmark_iter()
43 loops = NSEC_PER_SEC / nsec / 4 + 1; in benchmark_iter()
66 nsec = (finish.tv_sec - start.tv_sec) * NSEC_PER_SEC + in benchmark_insert()
87 nsec = (finish.tv_sec - start.tv_sec) * NSEC_PER_SEC + in benchmark_tagging()
108 nsec = (finish.tv_sec - start.tv_sec) * NSEC_PER_SEC + in benchmark_delete()
/linux-6.3-rc2/tools/testing/selftests/timens/
A Dfutex.c18 #define NSEC_PER_SEC 1000000000ULL macro
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()
/linux-6.3-rc2/arch/sparc/kernel/
A Dvdso.c48 (((u64)NSEC_PER_SEC) << tk->tkr_mono.shift)) { in update_vsyscall()
50 ((u64)NSEC_PER_SEC) << tk->tkr_mono.shift; in update_vsyscall()
63 while (vdata->monotonic_time_coarse_nsec >= NSEC_PER_SEC) { in update_vsyscall()
64 vdata->monotonic_time_coarse_nsec -= NSEC_PER_SEC; in update_vsyscall()
/linux-6.3-rc2/tools/testing/selftests/net/
A Dstress_reuseport_listen.c20 #define NSEC_PER_SEC 1000000000L macro
93 start_ns = start_ts.tv_sec * NSEC_PER_SEC + start_ts.tv_nsec; in main()
94 end_ns = end_ts.tv_sec * NSEC_PER_SEC + end_ts.tv_nsec; in main()
97 (end_ns - start_ns) / NSEC_PER_SEC, in main()
/linux-6.3-rc2/drivers/md/bcache/
A Dutil.c205 d->next += div_u64(done * NSEC_PER_SEC, atomic_long_read(&d->rate)); in bch_next_delay()
213 if (time_before64(now + NSEC_PER_SEC * 5LLU / 2LLU, d->next)) in bch_next_delay()
214 d->next = now + NSEC_PER_SEC * 5LLU / 2LLU; in bch_next_delay()
216 if (time_after64(now - NSEC_PER_SEC * 2, d->next)) in bch_next_delay()
217 d->next = now - NSEC_PER_SEC * 2; in bch_next_delay()
220 ? div_u64(d->next - now, NSEC_PER_SEC / HZ) in bch_next_delay()
/linux-6.3-rc2/fs/proc/
A Duptime.c31 idle.tv_sec = div_u64_rem(idle_nsec, NSEC_PER_SEC, &rem); in uptime_proc_show()
35 (uptime.tv_nsec / (NSEC_PER_SEC / 100)), in uptime_proc_show()
37 (idle.tv_nsec / (NSEC_PER_SEC / 100))); in uptime_proc_show()
/linux-6.3-rc2/drivers/net/ethernet/marvell/octeontx2/af/
A Dptp.c104 period_ns = ktime_set(0, (NSEC_PER_SEC + 100 - ptp_clock_hi)); in ptp_reset_thresh()
107 period_ns = ktime_set(0, (NSEC_PER_SEC + 100 - delta_ns)); in ptp_reset_thresh()
120 period_ns = ktime_set(0, (NSEC_PER_SEC + 100 - start_ns)); in ptp_hrtimer_start()
141 return sec * NSEC_PER_SEC + nsec; in read_ptp_tstmp_sec_nsec()
167 cycle_time = NSEC_PER_SEC * CYCLE_MULT / ptp_clock_freq; in ptp_calc_adjusted_comp()
174 while (ptp_clock_nsec < NSEC_PER_SEC) { in ptp_calc_adjusted_comp()
181 ns_drift = ptp_clock_nsec - NSEC_PER_SEC; in ptp_calc_adjusted_comp()
335 ptp->clock_period = NSEC_PER_SEC / ptp->clock_rate; in ptp_start()
355 *clk = (timestamp >> 32) * NSEC_PER_SEC + (timestamp & 0xFFFFFFFF); in ptp_get_tstmp()
/linux-6.3-rc2/drivers/rtc/
A Drtc-goldfish.c38 do_div(rtc_alarm, NSEC_PER_SEC); in goldfish_rtc_read_alarm()
63 rtc_alarm64 = rtc_tm_to_time64(&alrm->time) * NSEC_PER_SEC; in goldfish_rtc_set_alarm()
125 do_div(time, NSEC_PER_SEC); in goldfish_rtc_read_time()
141 now64 = rtc_tm_to_time64(tm) * NSEC_PER_SEC; in goldfish_rtc_set_time()
179 rtcdrv->rtc->range_max = U64_MAX / NSEC_PER_SEC; in goldfish_rtc_probe()
/linux-6.3-rc2/drivers/pwm/
A Dpwm-sun4i.c133 state->period = DIV_ROUND_UP_ULL(NSEC_PER_SEC, clk_rate); in sun4i_pwm_get_state()
162 tmp = (u64)prescaler * NSEC_PER_SEC * PWM_REG_DTY(val); in sun4i_pwm_get_state()
165 tmp = (u64)prescaler * NSEC_PER_SEC * PWM_REG_PRD(val); in sun4i_pwm_get_state()
183 (state->period * clk_rate >= NSEC_PER_SEC) && in sun4i_pwm_calculate()
184 (state->period * clk_rate < 2 * NSEC_PER_SEC) && in sun4i_pwm_calculate()
185 (state->duty_cycle * clk_rate * 2 >= NSEC_PER_SEC); in sun4i_pwm_calculate()
199 div = clk_rate * state->period + NSEC_PER_SEC / 2; in sun4i_pwm_calculate()
200 do_div(div, NSEC_PER_SEC); in sun4i_pwm_calculate()
216 do_div(div, NSEC_PER_SEC); in sun4i_pwm_calculate()
A Dpwm-sunplus.c84 if (clk_rate > (u64)SP7021_PWM_FREQ_SCALER * NSEC_PER_SEC) in sunplus_pwm_apply()
92 * NSEC_PER_SEC); in sunplus_pwm_apply()
117 (u64)dd_freq * NSEC_PER_SEC); in sunplus_pwm_apply()
146 * NSEC_PER_SEC, clk_rate); in sunplus_pwm_get_state()
150 state->duty_cycle = DIV64_U64_ROUND_UP((u64)dd_freq * (u64)duty * NSEC_PER_SEC, in sunplus_pwm_get_state()
/linux-6.3-rc2/drivers/clocksource/
A Djcore-pit.c54 return seclo * NSEC_PER_SEC + nsec; in jcore_sched_clock_read()
113 freq = DIV_ROUND_CLOSEST(NSEC_PER_SEC, buspd); in jcore_pit_local_init()
114 pit->periodic_delta = DIV_ROUND_CLOSEST(NSEC_PER_SEC, HZ * buspd); in jcore_pit_local_init()
156 NSEC_PER_SEC, 400, 32, in jcore_pit_init()
163 sched_clock_register(jcore_sched_clock_read, 32, NSEC_PER_SEC); in jcore_pit_init()
/linux-6.3-rc2/tools/perf/examples/bpf/
A D5sec.c45 #define NSEC_PER_SEC 1000000000L macro
50 return sec / NSEC_PER_SEC == 5ULL; in hrtimer_nanosleep()
/linux-6.3-rc2/tools/testing/selftests/ptp/
A Dtestptp.c38 #define NSEC_PER_SEC 1000000000LL macro
445 perout_request.period.sec = perout / NSEC_PER_SEC; in main()
446 perout_request.period.nsec = perout % NSEC_PER_SEC; in main()
450 perout_request.on.sec = pulsewidth / NSEC_PER_SEC; in main()
451 perout_request.on.nsec = pulsewidth % NSEC_PER_SEC; in main()
455 perout_request.phase.sec = perout_phase / NSEC_PER_SEC; in main()
456 perout_request.phase.nsec = perout_phase % NSEC_PER_SEC; in main()

Completed in 43 milliseconds

12345678910>>...16