| /OK3568_Linux_fs/kernel/tools/testing/selftests/timers/ |
| H A D | valid-adjtimex.c | 37 #define NSEC_PER_SEC 1000000000LL macro 205 tmx.time.tv_sec = offset / NSEC_PER_SEC; in set_offset() 206 tmx.time.tv_usec = offset % NSEC_PER_SEC; in set_offset() 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() [all …]
|
| H A D | nsleep-lat.c | 29 #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()
|
| H A D | mqueue-lat.c | 34 #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()
|
| H A D | alarmtimer-suspend.c | 48 #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()
|
| H A D | raw_skew.c | 31 #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()
|
| H A D | nanosleep.c | 32 #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() 148 while (length <= (NSEC_PER_SEC * 10)) { in main()
|
| H A D | adjtick.c | 30 #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()
|
| H A D | leap-a-day.c | 53 #define NSEC_PER_SEC 1000000000ULL macro 74 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add() 75 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add() 165 target = timespec_add(now, NSEC_PER_SEC/2); in test_hrtimer_failure() 356 ts.tv_nsec = NSEC_PER_SEC / 2; in main()
|
| H A D | set-timer-lat.c | 48 #define NSEC_PER_SEC 1000000000ULL macro 90 long long ret = NSEC_PER_SEC * b.tv_sec + b.tv_nsec; in timespec_sub() 92 ret -= NSEC_PER_SEC * a.tv_sec + a.tv_nsec; in timespec_sub() 106 delta_ns -= NSEC_PER_SEC * TIMER_SECS * alarmcount; in sigalarm()
|
| /OK3568_Linux_fs/kernel/include/linux/ |
| H A D | acct.h | 70 #if (TICK_NSEC % (NSEC_PER_SEC / AHZ)) == 0 in jiffies_to_AHZ() 78 do_div(tmp, (NSEC_PER_SEC / AHZ)); in jiffies_to_AHZ() 85 #if (NSEC_PER_SEC % AHZ) == 0 in nsec_to_AHZ() 86 do_div(x, (NSEC_PER_SEC / AHZ)); in nsec_to_AHZ() 89 do_div(x, (NSEC_PER_SEC / 512)); in nsec_to_AHZ() 97 do_div(x, (unsigned long)((9ull * NSEC_PER_SEC + (AHZ/2)) in nsec_to_AHZ()
|
| H A D | time64.h | 28 #define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC) 93 if ((unsigned long)ts->tv_nsec >= NSEC_PER_SEC) in timespec64_valid() 131 return ((s64) ts->tv_sec * NSEC_PER_SEC) + ts->tv_nsec; in timespec64_to_ns() 152 a->tv_sec += __iter_div_u64_rem(a->tv_nsec + ns, NSEC_PER_SEC, &ns); in timespec64_add_ns()
|
| /OK3568_Linux_fs/kernel/kernel/time/ |
| H A D | time.c | 480 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() 512 ts.tv_sec = div_u64_rem(nsec, NSEC_PER_SEC, &rem); in ns_to_timespec64() 520 ts.tv_sec = -div_u64_rem(-nsec - 1, NSEC_PER_SEC, &rem) - 1; in ns_to_timespec64() 521 ts.tv_nsec = NSEC_PER_SEC - rem - 1; in ns_to_timespec64() 613 NSEC_PER_SEC, &rem); in jiffies_to_timespec64() 623 #if (TICK_NSEC % (NSEC_PER_SEC / USER_HZ)) == 0 in jiffies_to_clock_t() 630 return div_u64((u64)x * TICK_NSEC, NSEC_PER_SEC / USER_HZ); in jiffies_to_clock_t() 654 #if (TICK_NSEC % (NSEC_PER_SEC / USER_HZ)) == 0 in jiffies_64_to_clock_t() [all …]
|
| H A D | vsyscall.c | 39 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()
|
| /OK3568_Linux_fs/kernel/tools/testing/radix-tree/ |
| H A D | benchmark.c | 12 #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()
|
| /OK3568_Linux_fs/kernel/tools/testing/selftests/timens/ |
| H A D | futex.c | 18 #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()
|
| /OK3568_Linux_fs/kernel/arch/sparc/kernel/ |
| H A D | vdso.c | 48 (((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()
|
| /OK3568_Linux_fs/kernel/drivers/md/bcache/ |
| H A D | util.c | 205 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()
|
| /OK3568_Linux_fs/kernel/fs/proc/ |
| H A D | uptime.c | 30 idle.tv_sec = div_u64_rem(idle_nsec, NSEC_PER_SEC, &rem); in uptime_proc_show() 34 (uptime.tv_nsec / (NSEC_PER_SEC / 100)), in uptime_proc_show() 36 (idle.tv_nsec / (NSEC_PER_SEC / 100))); in uptime_proc_show()
|
| /OK3568_Linux_fs/kernel/drivers/pwm/ |
| H A D | pwm-sun4i.c | 132 state->period = DIV_ROUND_UP_ULL(NSEC_PER_SEC, clk_rate); in sun4i_pwm_get_state() 161 tmp = (u64)prescaler * NSEC_PER_SEC * PWM_REG_DTY(val); in sun4i_pwm_get_state() 164 tmp = (u64)prescaler * NSEC_PER_SEC * PWM_REG_PRD(val); in sun4i_pwm_get_state() 180 (state->period * clk_rate >= NSEC_PER_SEC) && in sun4i_pwm_calculate() 181 (state->period * clk_rate < 2 * NSEC_PER_SEC) && in sun4i_pwm_calculate() 182 (state->duty_cycle * clk_rate * 2 >= NSEC_PER_SEC); in sun4i_pwm_calculate() 196 div = clk_rate * state->period + NSEC_PER_SEC / 2; in sun4i_pwm_calculate() 197 do_div(div, NSEC_PER_SEC); in sun4i_pwm_calculate() 213 do_div(div, NSEC_PER_SEC); in sun4i_pwm_calculate()
|
| /OK3568_Linux_fs/kernel/drivers/clocksource/ |
| H A D | jcore-pit.c | 57 return seclo * NSEC_PER_SEC + nsec; in jcore_sched_clock_read() 116 freq = DIV_ROUND_CLOSEST(NSEC_PER_SEC, buspd); in jcore_pit_local_init() 117 pit->periodic_delta = DIV_ROUND_CLOSEST(NSEC_PER_SEC, HZ * buspd); in jcore_pit_local_init() 159 NSEC_PER_SEC, 400, 32, in jcore_pit_init() 166 sched_clock_register(jcore_sched_clock_read, 32, NSEC_PER_SEC); in jcore_pit_init()
|
| /OK3568_Linux_fs/kernel/drivers/rtc/ |
| H A D | rtc-goldfish.c | 48 do_div(rtc_alarm, NSEC_PER_SEC); in goldfish_rtc_read_alarm() 73 rtc_alarm64 = rtc_tm_to_time64(&alrm->time) * NSEC_PER_SEC; in goldfish_rtc_set_alarm() 135 do_div(time, NSEC_PER_SEC); in goldfish_rtc_read_time() 151 now64 = rtc_tm_to_time64(tm) * NSEC_PER_SEC; in goldfish_rtc_set_time() 189 rtcdrv->rtc->range_max = U64_MAX / NSEC_PER_SEC; in goldfish_rtc_probe()
|
| /OK3568_Linux_fs/kernel/tools/testing/selftests/ptp/ |
| H A D | testptp.c | 38 #define NSEC_PER_SEC 1000000000LL macro 423 perout_request.period.sec = perout / NSEC_PER_SEC; in main() 424 perout_request.period.nsec = perout % NSEC_PER_SEC; in main() 428 perout_request.on.sec = pulsewidth / NSEC_PER_SEC; in main() 429 perout_request.on.nsec = pulsewidth % NSEC_PER_SEC; in main() 433 perout_request.phase.sec = perout_phase / NSEC_PER_SEC; in main() 434 perout_request.phase.nsec = perout_phase % NSEC_PER_SEC; in main()
|
| /OK3568_Linux_fs/kernel/drivers/net/ethernet/intel/igc/ |
| H A D | igc_tsn.c | 52 wr32(IGC_ENDQT(i), NSEC_PER_SEC); in igc_tsn_disable_offload() 55 wr32(IGC_QBVCYCLET_S, NSEC_PER_SEC); in igc_tsn_disable_offload() 56 wr32(IGC_QBVCYCLET, NSEC_PER_SEC); in igc_tsn_disable_offload() 123 baset_h = div_s64_rem(base_time, NSEC_PER_SEC, &baset_l); in igc_tsn_enable_offload()
|
| /OK3568_Linux_fs/kernel/drivers/gpu/arm/bifrost/ |
| H A D | mali_kbase_ccswe.c | 39 diff_s = div_s64(diff_ns, NSEC_PER_SEC); in kbasep_ccswe_cycle_at_no_lock() 40 diff_ns -= diff_s * NSEC_PER_SEC; in kbasep_ccswe_cycle_at_no_lock() 43 + div_s64(diff_ns * gpu_freq, NSEC_PER_SEC); in kbasep_ccswe_cycle_at_no_lock()
|
| /OK3568_Linux_fs/kernel/drivers/pps/generators/ |
| H A D | pps_gen_parport.c | 80 lim = NSEC_PER_SEC - send_delay - dev->port_write_time; in hrtimer_event() 100 lim = NSEC_PER_SEC - dev->port_write_time; in hrtimer_event() 134 NSEC_PER_SEC - (send_delay + in hrtimer_event() 175 NSEC_PER_SEC - (send_delay + in next_intr_time()
|