Home
last modified time | relevance | path

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

/linux-4.1.27/include/asm-generic/
Dcputime_nsecs.h36 cputime_div(__ct, NSEC_PER_SEC / HZ)
39 (__force cputime_t)((__jif) * (NSEC_PER_SEC / HZ))
41 cputime_div(__ct, NSEC_PER_SEC / HZ)
43 (__force cputime64_t)((__jif) * (NSEC_PER_SEC / HZ))
69 cputime_div(__ct, NSEC_PER_SEC)
71 (__force cputime_t)((__secs) * NSEC_PER_SEC)
78 u64 ret = (u64)val->tv_sec * NSEC_PER_SEC + val->tv_nsec; in timespec_to_cputime()
85 val->tv_sec = cputime_div_rem(ct, NSEC_PER_SEC, &rem); in cputime_to_timespec()
94 u64 ret = (u64)val->tv_sec * NSEC_PER_SEC + in timeval_to_cputime()
102 val->tv_sec = cputime_div_rem(ct, NSEC_PER_SEC, &rem); in cputime_to_timeval()
[all …]
/linux-4.1.27/kernel/time/
Dtime.c361 while (nsec >= NSEC_PER_SEC) { in set_normalized_timespec()
368 nsec -= NSEC_PER_SEC; in set_normalized_timespec()
373 nsec += NSEC_PER_SEC; in set_normalized_timespec()
395 ts.tv_sec = div_s64_rem(nsec, NSEC_PER_SEC, &rem); in ns_to_timespec()
398 rem += NSEC_PER_SEC; in ns_to_timespec()
441 while (nsec >= NSEC_PER_SEC) { in set_normalized_timespec64()
448 nsec -= NSEC_PER_SEC; in set_normalized_timespec64()
453 nsec += NSEC_PER_SEC; in set_normalized_timespec64()
475 ts.tv_sec = div_s64_rem(nsec, NSEC_PER_SEC, &rem); in ns_to_timespec64()
478 rem += NSEC_PER_SEC; in ns_to_timespec64()
[all …]
Djiffies.c40 #define NSEC_PER_JIFFY ((NSEC_PER_SEC+HZ/2)/HZ)
128 nsec_per_tick = (u64)NSEC_PER_SEC << 8; in register_refined_jiffies()
Dntp.c499 if (abs(now.tv_nsec - (NSEC_PER_SEC / 2)) <= tick_nsec * 5) { in sync_cmos_clock()
515 next.tv_nsec = (NSEC_PER_SEC / 2) - now.tv_nsec - (TICK_NSEC / 2); in sync_cmos_clock()
517 next.tv_nsec += NSEC_PER_SEC; in sync_cmos_clock()
524 if (next.tv_nsec >= NSEC_PER_SEC) { in sync_cmos_clock()
526 next.tv_nsec -= NSEC_PER_SEC; in sync_cmos_clock()
737 if (norm.nsec > (NSEC_PER_SEC >> 1)) { in pps_normalize_ts()
738 norm.nsec -= NSEC_PER_SEC; in pps_normalize_ts()
Dsched_clock.c86 .read_data[0] = { .mult = NSEC_PER_SEC / HZ,
182 clocks_calc_mult_shift(&new_mult, &new_shift, rate, NSEC_PER_SEC, 3600); in sched_clock_register()
Dtimekeeping.c69 while (tk->tkr_mono.xtime_nsec >= ((u64)NSEC_PER_SEC << tk->tkr_mono.shift)) { in tk_normalize_xtime()
70 tk->tkr_mono.xtime_nsec -= (u64)NSEC_PER_SEC << tk->tkr_mono.shift; in tk_normalize_xtime()
569 tk->tkr_mono.base = ns_to_ktime(seconds * NSEC_PER_SEC + nsec); in tk_update_ktime_data()
580 if (nsec >= NSEC_PER_SEC) in tk_update_ktime_data()
955 if ((unsigned long)ts->tv_nsec >= NSEC_PER_SEC) in timekeeping_inject_offset()
1684 u64 nsecps = (u64)NSEC_PER_SEC << tk->tkr_mono.shift; in accumulate_nsecs_to_secs()
1744 if (raw_nsecs >= NSEC_PER_SEC) { in logarithmic_accumulation()
1746 raw_nsecs = do_div(raw_secs, NSEC_PER_SEC); in logarithmic_accumulation()
Dtick-common.c187 tick_period = ktime_set(0, NSEC_PER_SEC / HZ); in tick_setup_device()
Dclocksource.c126 #define WATCHDOG_THRESHOLD (NSEC_PER_SEC >> 4)
687 NSEC_PER_SEC / scale, sec * scale); in __clocksource_update_freq_scale()
Dposix-cpu-timers.c61 ret = (unsigned long long)tp->tv_sec * NSEC_PER_SEC + tp->tv_nsec; in timespec_to_sample()
149 tp->tv_nsec = ((NSEC_PER_SEC + HZ - 1) / HZ); in posix_cpu_clock_getres()
Dclockevents.c202 #define MIN_DELTA_LIMIT (NSEC_PER_SEC / HZ)
Dalarmtimer.c257 if (ktime_to_ns(min) < 2 * NSEC_PER_SEC) { in alarmtimer_suspend()
Dtick-sched.c754 ts->sleep_length = (ktime_t) { .tv64 = NSEC_PER_SEC/HZ }; in can_stop_idle_tick()
Dposix-timers.c481 ktime_t kj = ktime_set(0, NSEC_PER_SEC / HZ); in posix_timer_fn()
/linux-4.1.27/include/linux/
Dacct.h72 #if (TICK_NSEC % (NSEC_PER_SEC / AHZ)) == 0 in jiffies_to_AHZ()
80 do_div(tmp, (NSEC_PER_SEC / AHZ)); in jiffies_to_AHZ()
87 #if (NSEC_PER_SEC % AHZ) == 0 in nsec_to_AHZ()
88 do_div(x, (NSEC_PER_SEC / AHZ)); in nsec_to_AHZ()
91 do_div(x, (NSEC_PER_SEC / 512)); in nsec_to_AHZ()
99 do_div(x, (unsigned long)((9ull * NSEC_PER_SEC + (AHZ/2)) in nsec_to_AHZ()
Dtime64.h27 #define NSEC_PER_SEC 1000000000L macro
32 #define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC)
139 if ((unsigned long)ts->tv_nsec >= NSEC_PER_SEC) in timespec64_valid()
163 return ((s64) ts->tv_sec * NSEC_PER_SEC) + ts->tv_nsec; in timespec64_to_ns()
184 a->tv_sec += __iter_div_u64_rem(a->tv_nsec + ns, NSEC_PER_SEC, &ns); in timespec64_add_ns()
Djiffies.h60 #define TICK_NSEC ((NSEC_PER_SEC+HZ/2)/HZ)
256 #if !((((NSEC_PER_SEC << 2) / TICK_NSEC) << (SEC_JIFFIE_SC - 2)) & 0x80000000)
261 #define SEC_CONVERSION ((unsigned long)((((u64)NSEC_PER_SEC << SEC_JIFFIE_SC) +\
273 (long)((u64)((u64)MAX_JIFFY_OFFSET * TICK_NSEC) / NSEC_PER_SEC)
276 (SH_DIV((MAX_JIFFY_OFFSET >> SEC_JIFFIE_SC) * TICK_NSEC, NSEC_PER_SEC, 1) - 1)
Dtime.h98 if ((unsigned long)ts->tv_nsec >= NSEC_PER_SEC) in timespec_valid()
193 return ((s64) ts->tv_sec * NSEC_PER_SEC) + ts->tv_nsec; in timespec_to_ns()
205 return ((s64) tv->tv_sec * NSEC_PER_SEC) + in timeval_to_ns()
235 a->tv_sec += __iter_div_u64_rem(a->tv_nsec + ns, NSEC_PER_SEC, &ns); in timespec_add_ns()
Dtimex.h152 #define NTP_INTERVAL_LENGTH (NSEC_PER_SEC/NTP_INTERVAL_FREQ)
Dclockchips.h183 return clocks_calc_mult_shift(&ce->mult, &ce->shift, NSEC_PER_SEC, freq, minsec); in clockevents_calc_mult_shift()
Dtick.h108 ktime_t len = { .tv64 = NSEC_PER_SEC/HZ }; in tick_nohz_get_sleep_length()
Dktime.h55 return (ktime_t) { .tv64 = secs * NSEC_PER_SEC + (s64)nsecs }; in ktime_set()
/linux-4.1.27/tools/testing/selftests/timers/
Dnsleep-lat.c40 #define NSEC_PER_SEC 1000000000ULL macro
93 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add()
94 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add()
103 long long ret = NSEC_PER_SEC * b.tv_sec + b.tv_nsec; in timespec_sub()
105 ret -= NSEC_PER_SEC * a.tv_sec + a.tv_nsec; in timespec_sub()
115 target.tv_sec = ns/NSEC_PER_SEC; in nanosleep_lat_test()
116 target.tv_nsec = ns%NSEC_PER_SEC; in nanosleep_lat_test()
171 while (length <= (NSEC_PER_SEC * 10)) { in main()
Dmqueue-lat.c45 #define NSEC_PER_SEC 1000000000ULL macro
53 long long ret = NSEC_PER_SEC * b.tv_sec + b.tv_nsec; in timespec_sub()
55 ret -= NSEC_PER_SEC * a.tv_sec + a.tv_nsec; in timespec_sub()
62 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add()
63 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add()
Dalarmtimer-suspend.c59 #define NSEC_PER_SEC 1000000000ULL macro
60 #define UNREASONABLE_LAT (NSEC_PER_SEC * 4) /* hopefully we resume in 4secs */
100 long long ret = NSEC_PER_SEC * b.tv_sec + b.tv_nsec; in timespec_sub()
102 ret -= NSEC_PER_SEC * a.tv_sec + a.tv_nsec; in timespec_sub()
117 delta_ns -= NSEC_PER_SEC * SUSPEND_SECS * alarmcount; in sigalarm()
Draw_skew.c43 #define NSEC_PER_SEC 1000000000LL macro
60 return ts.tv_sec * NSEC_PER_SEC + ts.tv_nsec; in ts_to_nsec()
67 ts.tv_sec = ns/NSEC_PER_SEC; in nsec_to_ts()
68 ts.tv_nsec = ns%NSEC_PER_SEC; in nsec_to_ts()
138 eppm = ((delta2-delta1)*NSEC_PER_SEC)/interval; in main()
Dnanosleep.c42 #define NSEC_PER_SEC 1000000000ULL macro
104 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add()
105 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add()
157 while (length <= (NSEC_PER_SEC * 10)) { in main()
Dleap-a-day.c63 #define NSEC_PER_SEC 1000000000ULL macro
81 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add()
82 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add()
143 target = timespec_add(now, NSEC_PER_SEC/2); in test_hrtimer_failure()
302 ts.tv_nsec = NSEC_PER_SEC / 2; in main()
Dset-timer-lat.c58 #define NSEC_PER_SEC 1000000000ULL macro
99 long long ret = NSEC_PER_SEC * b.tv_sec + b.tv_nsec; in timespec_sub()
101 ret -= NSEC_PER_SEC * a.tv_sec + a.tv_nsec; in timespec_sub()
115 delta_ns -= NSEC_PER_SEC * TIMER_SECS * alarmcount; in sigalarm()
Dinconsistency-check.c45 #define NSEC_PER_SEC 1000000000ULL macro
145 delta = list[inconsistent].tv_sec * NSEC_PER_SEC; in consistency_test()
147 delta -= list[inconsistent+1].tv_sec * NSEC_PER_SEC; in consistency_test()
Dset-2038.c43 #define NSEC_PER_SEC 1000000000LL macro
46 #define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC)
Dskew_consistency.c51 #define NSEC_PER_SEC 1000000000LL macro
Dchange_skew.c44 #define NSEC_PER_SEC 1000000000LL macro
Dvalid-adjtimex.c48 #define NSEC_PER_SEC 1000000000L macro
/linux-4.1.27/arch/x86/kernel/
Dvsyscall_gtod.c49 (((u64)NSEC_PER_SEC) << tk->tkr_mono.shift)) { in update_vsyscall()
51 ((u64)NSEC_PER_SEC) << tk->tkr_mono.shift; in update_vsyscall()
64 while (vdata->monotonic_time_coarse_nsec >= NSEC_PER_SEC) { in update_vsyscall()
65 vdata->monotonic_time_coarse_nsec -= NSEC_PER_SEC; in update_vsyscall()
Dpvclock.c136 delta += now.tv_sec * (u64)NSEC_PER_SEC + now.tv_nsec; in pvclock_read_wallclock()
138 now.tv_nsec = do_div(delta, NSEC_PER_SEC); in pvclock_read_wallclock()
Dkvmclock.c263 clocksource_register_hz(&kvm_clock, NSEC_PER_SEC); in kvmclock_init()
Dhpet.c319 delta = ((uint64_t)(NSEC_PER_SEC/HZ)) * evt->mult; in hpet_set_mode()
1071 clc = (uint64_t) hpet_clockevent.mult * NSEC_PER_SEC; in hpet_rtc_timer_init()
1167 clc = (uint64_t) hpet_clockevent.mult * NSEC_PER_SEC; in hpet_set_periodic_freq()
/linux-4.1.27/fs/proc/
Duptime.c25 idle.tv_sec = div_u64_rem(nsec, NSEC_PER_SEC, &rem); in uptime_proc_show()
29 (uptime.tv_nsec / (NSEC_PER_SEC / 100)), in uptime_proc_show()
31 (idle.tv_nsec / (NSEC_PER_SEC / 100))); in uptime_proc_show()
/linux-4.1.27/drivers/md/bcache/
Dutil.c212 d->next += div_u64(done * NSEC_PER_SEC, d->rate); in bch_next_delay()
214 if (time_before64(now + NSEC_PER_SEC, d->next)) in bch_next_delay()
215 d->next = now + NSEC_PER_SEC; in bch_next_delay()
217 if (time_after64(now - NSEC_PER_SEC * 2, d->next)) in bch_next_delay()
218 d->next = now - NSEC_PER_SEC * 2; in bch_next_delay()
221 ? div_u64(d->next - now, NSEC_PER_SEC / HZ) in bch_next_delay()
Dutil.h405 #define NSEC_PER_sec NSEC_PER_SEC
/linux-4.1.27/arch/um/kernel/
Dtime.c90 itimer_clockevent.mult = div_sc(HZ, NSEC_PER_SEC, 32); in setup_itimer()
107 set_normalized_timespec(ts, nsecs / NSEC_PER_SEC, in read_persistent_clock()
108 nsecs % NSEC_PER_SEC); in read_persistent_clock()
/linux-4.1.27/include/linux/mfd/syscon/
Datmel-smc.h87 u32 clk_period = DIV_ROUND_UP(NSEC_PER_SEC, clk_rate); in at91sam9_smc_setup_ns_to_cycles()
117 u32 clk_period = DIV_ROUND_UP(NSEC_PER_SEC, clk_rate); in at91sam9_smc_pulse_ns_to_cycles()
147 u32 clk_period = DIV_ROUND_UP(NSEC_PER_SEC, clk_rate); in at91sam9_smc_cycle_ns_to_cycles()
/linux-4.1.27/drivers/clk/
Dclk-pwm.c80 clk_pwm->fixed_rate = NSEC_PER_SEC / pwm->period; in clk_pwm_probe()
82 if (pwm->period != NSEC_PER_SEC / clk_pwm->fixed_rate && in clk_pwm_probe()
83 pwm->period != DIV_ROUND_UP(NSEC_PER_SEC, clk_pwm->fixed_rate)) { in clk_pwm_probe()
/linux-4.1.27/drivers/pps/generators/
Dpps_gen_parport.c94 lim = NSEC_PER_SEC - send_delay - dev->port_write_time; in hrtimer_event()
114 lim = NSEC_PER_SEC - dev->port_write_time; in hrtimer_event()
148 NSEC_PER_SEC - (send_delay + in hrtimer_event()
189 NSEC_PER_SEC - (send_delay + in next_intr_time()
/linux-4.1.27/arch/tile/kernel/
Dtime.c279 (((u64)NSEC_PER_SEC) << tk->tkr_mono.shift)) { in update_vsyscall()
281 ((u64)NSEC_PER_SEC) << tk->tkr_mono.shift; in update_vsyscall()
294 while (vdso_data->monotonic_time_coarse_nsec >= NSEC_PER_SEC) { in update_vsyscall()
295 vdso_data->monotonic_time_coarse_nsec -= NSEC_PER_SEC; in update_vsyscall()
/linux-4.1.27/arch/um/include/shared/
Dcommon-offsets.h8 DEFINE(UM_NSEC_PER_SEC, NSEC_PER_SEC);
27 DEFINE(UM_NSEC_PER_SEC, NSEC_PER_SEC);
/linux-4.1.27/tools/perf/
Dperf.h17 #ifndef NSEC_PER_SEC
18 # define NSEC_PER_SEC 1000000000ULL macro
/linux-4.1.27/drivers/pps/
Dkapi.c44 while (ts->nsec >= NSEC_PER_SEC) { in pps_add_offset()
45 ts->nsec -= NSEC_PER_SEC; in pps_add_offset()
49 ts->nsec += NSEC_PER_SEC; in pps_add_offset()
Dpps.c168 ticks += fdata.timeout.nsec / (NSEC_PER_SEC / HZ); in pps_cdev_ioctl()
/linux-4.1.27/drivers/net/ethernet/freescale/
Dfec_ptp.c99 #define PPS_OUPUT_RELOAD_PERIOD NSEC_PER_SEC
172 val = NSEC_PER_SEC - (u32)ts.tv_nsec + tempval; in fec_ptp_enable_pps()
185 val += NSEC_PER_SEC; in fec_ptp_enable_pps()
328 lhs = NSEC_PER_SEC; in fec_ptp_adjfreq()
336 lhs += NSEC_PER_SEC; in fec_ptp_adjfreq()
589 fep->ptp_inc = NSEC_PER_SEC / fep->cycle_speed; in fec_ptp_init()
/linux-4.1.27/drivers/pwm/
Dpwm-img.c103 output_clk_hz = DIV_ROUND_UP(NSEC_PER_SEC, period_ns); in img_pwm_config()
242 val = (u64)NSEC_PER_SEC * 512 * pwm->data->max_timebase; in img_pwm_probe()
246 val = (u64)NSEC_PER_SEC * MIN_TMBASE_STEPS; in img_pwm_probe()
Dpwm-tiecap.c73 if (period_ns > NSEC_PER_SEC) in ecap_pwm_config()
78 do_div(c, NSEC_PER_SEC); in ecap_pwm_config()
87 do_div(c, NSEC_PER_SEC); in ecap_pwm_config()
Dpwm-sun4i.c117 div = clk_rate * period_ns + NSEC_PER_SEC/2; in sun4i_pwm_config()
118 do_div(div, NSEC_PER_SEC); in sun4i_pwm_config()
131 do_div(div, NSEC_PER_SEC); in sun4i_pwm_config()
Dpwm-atmel-hlcdc.c70 clk_period_ns = (u64)NSEC_PER_SEC * 256; in atmel_hlcdc_pwm_config()
82 clk_period_ns = (u64)NSEC_PER_SEC * 256; in atmel_hlcdc_pwm_config()
Dpwm-rockchip.c117 do_div(div, pc->data->prescaler * NSEC_PER_SEC); in rockchip_pwm_config()
121 do_div(div, pc->data->prescaler * NSEC_PER_SEC); in rockchip_pwm_config()
Dpwm-tiehrpwm.c245 if (period_ns > NSEC_PER_SEC) in ehrpwm_pwm_config()
250 do_div(c, NSEC_PER_SEC); in ehrpwm_pwm_config()
259 do_div(c, NSEC_PER_SEC); in ehrpwm_pwm_config()
Dpwm-samsung.c303 if (period_ns > NSEC_PER_SEC) in pwm_samsung_config()
320 period = NSEC_PER_SEC / period_ns; in pwm_samsung_config()
329 tin_ns = NSEC_PER_SEC / tin_rate; in pwm_samsung_config()
Dpwm-renesas-tpu.c273 / (NSEC_PER_SEC / period_ns); in tpu_pwm_config()
285 / (NSEC_PER_SEC / duty_ns); in tpu_pwm_config()
Dpwm-bfin.c73 do_div(val, NSEC_PER_SEC); in bfin_pwm_config()
Dpwm-atmel-tcb.c296 min = div_u64((u64)NSEC_PER_SEC * atmel_tc_divisors[i], rate); in atmel_tcb_pwm_config()
309 min = div_u64(NSEC_PER_SEC, rate); in atmel_tcb_pwm_config()
Dpwm-lpc32xx.c44 do_div(c, NSEC_PER_SEC); in lpc32xx_pwm_config()
Dpwm-clps711x.c63 pwm_set_period(pwm, DIV_ROUND_CLOSEST(NSEC_PER_SEC, freq)); in clps711x_pwm_request()
Dpwm-tegra.c90 hz = NSEC_PER_SEC / period_ns; in tegra_pwm_config()
Dpwm-bcm2835.c159 pc->scaler = NSEC_PER_SEC / clk_get_rate(pc->clk); in bcm2835_pwm_probe()
Dpwm-atmel.c118 do_div(div, NSEC_PER_SEC); in atmel_pwm_config()
Dpwm-sti.c91 val = NSEC_PER_SEC / pc->clk_rate; in sti_pwm_get_prescale()
/linux-4.1.27/arch/ia64/kernel/
Dtime.c306 local_cpu_data->nsec_per_cyc = ((NSEC_PER_SEC<<IA64_NSEC_PER_CYC_SHIFT) in ia64_init_itm()
449 while (fsyscall_gtod_data.monotonic_time.tv_nsec >= NSEC_PER_SEC) { in update_vsyscall_old()
450 fsyscall_gtod_data.monotonic_time.tv_nsec -= NSEC_PER_SEC; in update_vsyscall_old()
/linux-4.1.27/arch/x86/platform/uv/
Duv_time.c400 NSEC_PER_SEC, clock_event_device_uv.shift); in uv_rtc_setup_clock()
402 clock_event_device_uv.min_delta_ns = NSEC_PER_SEC / in uv_rtc_setup_clock()
406 (NSEC_PER_SEC / sn_rtc_cycles_per_second); in uv_rtc_setup_clock()
Dtlb_uv.c473 return ns_2_cycles(sec * NSEC_PER_SEC); in sec_2_cycles()
/linux-4.1.27/arch/tile/kernel/vdso/
Dvgettimeofday.c77 ts->tv_sec += __iter_div_u64_rem(ns, NSEC_PER_SEC, &ns); in do_realtime()
96 ts->tv_sec += __iter_div_u64_rem(ns, NSEC_PER_SEC, &ns); in do_monotonic()
/linux-4.1.27/drivers/rtc/
Dsystohc.c29 if (now.tv_nsec < (NSEC_PER_SEC >> 1)) in rtc_set_ntp_time()
Dhctosys.c32 .tv_nsec = NSEC_PER_SEC >> 1, in rtc_hctosys()
Dinterface.c594 period = ktime_set(0, NSEC_PER_SEC/rtc->irq_freq); in rtc_pie_update_irq()
705 ktime_t period = ktime_set(0, NSEC_PER_SEC / rtc->irq_freq); in rtc_update_hrtimer()
/linux-4.1.27/arch/c6x/kernel/
Dtime.c54 u64 tmp = (u64)NSEC_PER_SEC << SCHED_CLOCK_SHIFT; in time_init()
/linux-4.1.27/arch/cris/kernel/
Dtime.c85 return (unsigned long long)jiffies * (NSEC_PER_SEC / HZ) + in sched_clock()
/linux-4.1.27/arch/mn10300/kernel/
Dtime.c80 __muldiv64u(NSEC_PER_SEC, 1 << 16, MN10300_TSCCLK); in mn10300_sched_clock_init()
/linux-4.1.27/arch/arm/plat-omap/
Dcounter_32k.c103 32768, NSEC_PER_SEC, 120000); in omap_init_clocksource_32k()
/linux-4.1.27/arch/microblaze/kernel/
Dtimer.c184 div_sc(timer_clock_freq, NSEC_PER_SEC, in xilinx_clockevent_init()
222 xilinx_cc.mult = div_sc(timer_clock_freq, NSEC_PER_SEC, in init_xilinx_timecounter()
/linux-4.1.27/arch/powerpc/kernel/vdso64/
Dgettimeofday.S73 lis r7,NSEC_PER_SEC@h /* want nanoseconds */
74 ori r7,r7,NSEC_PER_SEC@l
/linux-4.1.27/arch/alpha/kernel/
Dtime.c204 clockevents_config_and_register(ce, NSEC_PER_SEC, 1000, LONG_MAX); in init_qemu_clockevent()
402 clocksource_register_hz(&qemu_cs, NSEC_PER_SEC); in time_init()
/linux-4.1.27/arch/score/kernel/
Dtime.c91 score_clockevent.mult = div_sc(SYSTEM_CLOCK, NSEC_PER_SEC, in time_init()
/linux-4.1.27/arch/blackfin/kernel/
Dtime-ts.c228 evt->mult = div_sc(clock_tick, NSEC_PER_SEC, evt->shift); in bfin_gptmr0_clockevent_init()
341 evt->mult = div_sc(clock_tick, NSEC_PER_SEC, evt->shift); in bfin_coretmr_clockevent_init()
/linux-4.1.27/arch/sparc/kernel/
Dtime_32.c141 ce->mult = div_sc(sparc_config.clock_rate, NSEC_PER_SEC, in setup_timer_ce()
239 ce->mult = div_sc(sparc_config.clock_rate, NSEC_PER_SEC, in register_percpu_ce()
/linux-4.1.27/arch/x86/vdso/
Dvclock_gettime.c245 ts->tv_sec += __iter_div_u64_rem(ns, NSEC_PER_SEC, &ns); in do_realtime()
266 ts->tv_sec += __iter_div_u64_rem(ns, NSEC_PER_SEC, &ns); in do_monotonic()
/linux-4.1.27/arch/arm/lib/
Ddelay.c83 NSEC_PER_SEC, 3600); in register_current_timer_delay()
/linux-4.1.27/arch/powerpc/kernel/vdso32/
Dgettimeofday.S85 lis r7,NSEC_PER_SEC@h /* want nanoseconds */
86 ori r7,r7,NSEC_PER_SEC@l
/linux-4.1.27/arch/x86/kernel/cpu/
Dmshyperv.c140 clocksource_register_hz(&hyperv_cs, NSEC_PER_SEC/100); in ms_hyperv_init_platform()
Dperf_event_intel_uncore.h8 #define UNCORE_PMU_HRTIMER_INTERVAL (60LL * NSEC_PER_SEC)
9 #define UNCORE_SNB_IMC_HRTIMER_INTERVAL (5ULL * NSEC_PER_SEC)
/linux-4.1.27/arch/mips/alchemy/common/
Dtime.c145 cd->mult = div_sc(32768, NSEC_PER_SEC, cd->shift); in alchemy_time_init()
/linux-4.1.27/arch/avr32/kernel/
Dtime.c142 comparator.mult = div_sc(counter_hz, NSEC_PER_SEC, comparator.shift); in time_init()
/linux-4.1.27/arch/m68k/coldfire/
Dpit.c155 cf_pit_clockevent.mult = div_sc(FREQ, NSEC_PER_SEC, 32); in hw_timer_init()
/linux-4.1.27/arch/mips/kernel/
Dbinfmt_elfn32.c107 value->tv_sec = div_u64_rem(nsec, NSEC_PER_SEC, &rem); in jiffies_to_compat_timeval()
Dbinfmt_elfo32.c128 value->tv_sec = div_u64_rem(nsec, NSEC_PER_SEC, &rem); in jiffies_to_compat_timeval()
Dcevt-txx9.c101 __raw_writel(((u64)(NSEC_PER_SEC / HZ) * evt->mult) >> in txx9tmr_set_mode()
/linux-4.1.27/arch/arm64/kernel/
Dasm-offsets.c82 DEFINE(NSEC_PER_SEC, NSEC_PER_SEC); in main()
/linux-4.1.27/arch/m32r/kernel/
Dtime.c161 ts->tv_nsec = (INITIAL_JIFFIES % HZ) * (NSEC_PER_SEC / HZ); in read_persistent_clock()
/linux-4.1.27/include/net/
Dpkt_sched.h49 #define PSCHED_TICKS_PER_SEC PSCHED_NS2TICKS(NSEC_PER_SEC)
/linux-4.1.27/drivers/clocksource/
Dmetag_generic.c135 clk->mult = div_sc(hwtimer_freq, NSEC_PER_SEC, clk->shift); in arch_timer_setup()
Dexynos_mct.c300 (((unsigned long long) NSEC_PER_SEC / HZ * evt->mult) >> evt->shift); in exynos4_comp_set_mode()
404 (((unsigned long long) NSEC_PER_SEC / HZ * evt->mult) >> evt->shift); in exynos4_tick_set_mode()
Dtimer-atmel-pit.c226 data->clkevt.mult = div_sc(pit_rate, NSEC_PER_SEC, data->clkevt.shift); in at91sam926x_pit_common_init()
Dsh_cmt.c713 ced->mult = div_sc(ch->rate, NSEC_PER_SEC, ced->shift); in sh_cmt_clock_event_start()
/linux-4.1.27/fs/ubifs/
Dmisc.h238 return (inode->i_sb->s_time_gran < NSEC_PER_SEC) ? in ubifs_current_time()
/linux-4.1.27/drivers/char/
Dmmtimer.c500 sgi_clock_offset.tv_sec = tp->tv_sec - div_u64_rem(nsec, NSEC_PER_SEC, &rem); in sgi_clock_set()
505 sgi_clock_offset.tv_nsec = tp->tv_sec + NSEC_PER_SEC - rem; in sgi_clock_set()
842 sgi_clock_period = NSEC_PER_SEC / sn_rtc_cycles_per_second; in mmtimer_init()
/linux-4.1.27/net/netfilter/
Dxt_time.c175 stamp = div_s64(stamp, NSEC_PER_SEC); in time_mt()
Dnf_conntrack_standalone.c154 delta_time = div_s64(delta_time, NSEC_PER_SEC); in ct_show_delta_time()
/linux-4.1.27/arch/mips/sgi-ip27/
Dip27-timer.c108 #define CYCLES_PER_SEC (NSEC_PER_SEC / NSEC_PER_CYCLE)
/linux-4.1.27/drivers/spi/
Dspi-txx9.c131 txx9spi_cs_func(spi, c, 0, (NSEC_PER_SEC / 2) / spi->max_speed_hz); in txx9spi_setup()
160 cs_delay = 100 + (NSEC_PER_SEC / 2) / spi->max_speed_hz; in txx9spi_work_one()
Dspi-fsl-dspi.c190 scale_needed = div_u64_rem((u64)delay_ns * clkrate, NSEC_PER_SEC, in ns_delay_scale()
/linux-4.1.27/arch/cris/arch-v10/kernel/
Dtime.c68 return (TIMER0_DIV - count) * (NSEC_PER_SEC/HZ)/TIMER0_DIV; in cris_v10_gettimeoffset()
/linux-4.1.27/arch/x86/kvm/
Di8254.c149 d = muldiv64(t, KVM_PIT_FREQ, NSEC_PER_SEC); in pit_get_count()
179 d = muldiv64(t, KVM_PIT_FREQ, NSEC_PER_SEC); in pit_get_out()
341 interval = muldiv64(val, NSEC_PER_SEC, KVM_PIT_FREQ); in create_pit_timer()
Dx86.c1230 kvm_get_time_scale(this_tsc_khz, NSEC_PER_SEC / 1000, in kvm_set_tsc_khz()
1654 kvm_get_time_scale(NSEC_PER_SEC / 1000, this_tsc_khz, in kvm_guest_time_update()
/linux-4.1.27/kernel/sched/
Dclock.c73 * (NSEC_PER_SEC / HZ); in sched_clock()
Dsched.h35 #define NS_TO_JIFFIES(TIME) ((unsigned long)(TIME) / (NSEC_PER_SEC / HZ))
Dcore.c1257 ktime_t to = ktime_set(0, NSEC_PER_SEC/HZ); in wait_task_inactive()
8070 const u64 max_cfs_quota_period = 1 * NSEC_PER_SEC; /* 1s */
/linux-4.1.27/arch/powerpc/kvm/
Demulate.c75 dec_nsec = do_div(dec_time, NSEC_PER_SEC); in kvmppc_emulate_dec()
Dbook3s_hv.c1713 dec_nsec = (vcpu->arch.dec_expires - now) * NSEC_PER_SEC in kvmppc_set_timer()
/linux-4.1.27/kernel/power/
Dwakelock.c117 if (idle_time_ns < ((u64)WL_GC_TIME_SEC * NSEC_PER_SEC)) in wakelocks_gc()
/linux-4.1.27/drivers/mtd/nand/gpmi-nand/
Dgpmi-lib.c373 clock_period_in_ns = NSEC_PER_SEC / clock_frequency_in_hz; in gpmi_nfc_compute_hardware_timing()
893 clk_period = NSEC_PER_SEC / (rate / 10); in gpmi_compute_edo_timing()
1061 clock_period_in_ns = NSEC_PER_SEC / clk_get_rate(r->clock[0]); in gpmi_begin()
/linux-4.1.27/net/sched/
Dsch_fq.c495 u64 len = (u64)plen * NSEC_PER_SEC; in fq_dequeue()
503 if (unlikely(len > NSEC_PER_SEC)) { in fq_dequeue()
504 len = NSEC_PER_SEC; in fq_dequeue()
Dsch_htb.c901 next_event = q->now + 5LLU * NSEC_PER_SEC; in htb_dequeue()
911 event = q->now + NSEC_PER_SEC; in htb_dequeue()
1459 cl->mbuffer = 60ULL * NSEC_PER_SEC; /* 1min */ in htb_change_class()
Dsch_tbf.c130 do_div(len, NSEC_PER_SEC); in psched_ns_t2l()
Dsch_generic.c981 u64 factor = NSEC_PER_SEC; in psched_ratecfg_precompute()
Dsch_netem.c356 ticks = (u64)len * NSEC_PER_SEC; in packet_len_2_sched_time()
Dsch_api.c1903 (u32)NSEC_PER_SEC/(u32)ktime_to_ns(timespec_to_ktime(ts))); in psched_show()
/linux-4.1.27/drivers/net/ethernet/mellanox/mlx4/
Den_clock.c282 do_div(ns, NSEC_PER_SEC / 2 / HZ); in mlx4_en_init_timestamp()
/linux-4.1.27/drivers/memory/tegra/
Dmc.c73 do_div(tick, NSEC_PER_SEC); in tegra_mc_setup_latency_allowance()
/linux-4.1.27/drivers/media/usb/uvc/
Duvc_video.c660 y1 = NSEC_PER_SEC; in uvc_video_clock_update()
661 y2 = (ts.tv_sec + 1) * NSEC_PER_SEC + ts.tv_nsec; in uvc_video_clock_update()
678 div = div_u64_rem(y, NSEC_PER_SEC, &rem); in uvc_video_clock_update()
681 if (ts.tv_nsec >= NSEC_PER_SEC) { in uvc_video_clock_update()
683 ts.tv_nsec -= NSEC_PER_SEC; in uvc_video_clock_update()
/linux-4.1.27/drivers/infiniband/hw/mlx4/
Dalias_GUID.c308 rec->time_to_run = ktime_get_real_ns() + 1 * NSEC_PER_SEC; in aliasguid_query_handler()
415 resched_delay_sec * NSEC_PER_SEC; in aliasguid_query_handler()
709 div_u64((low_record_time - curr_time), NSEC_PER_SEC); in get_low_record_time_index()
/linux-4.1.27/arch/mips/kvm/
Demulate.c272 return div_u64(delta * vcpu->arch.count_hz, NSEC_PER_SEC); in kvm_mips_ktime_to_count()
432 delta = div_u64(delta * NSEC_PER_SEC, vcpu->arch.count_hz); in kvm_mips_resume_hrtimer()
475 vcpu->arch.count_period = div_u64((u64)NSEC_PER_SEC << 32, in kvm_mips_init_count()
502 if (count_hz <= 0 || count_hz > NSEC_PER_SEC) in kvm_mips_set_count_hz()
519 vcpu->arch.count_period = div_u64((u64)NSEC_PER_SEC << 32, count_hz); in kvm_mips_set_count_hz()
691 delta = div_u64(delta * NSEC_PER_SEC, in kvm_mips_set_count_ctl()
/linux-4.1.27/drivers/staging/iio/trigger/
Diio-trig-bfin-timer.c233 do_div(val, NSEC_PER_SEC); in iio_bfin_tmr_trigger_probe()
/linux-4.1.27/drivers/cpufreq/
Dqoriq-cpufreq.c271 u64temp = 12ULL * NSEC_PER_SEC; in qoriq_cpufreq_cpu_init()
/linux-4.1.27/kernel/trace/
Dring_buffer_benchmark.c230 timeout = ktime_add_ns(start_time, RUN_TIME * NSEC_PER_SEC); in ring_buffer_producer()
Dtrace_functions_graph.c645 usecs_rem = do_div(t, NSEC_PER_SEC); in print_graph_abs_time()
Dblktrace.c1151 unsigned long nsec_rem = do_div(ts, NSEC_PER_SEC); in blk_log_action_classic()
/linux-4.1.27/drivers/ptp/
Dptp_clock.c146 if ((unsigned long) ts.tv_nsec >= NSEC_PER_SEC) in ptp_clock_adjtime()
/linux-4.1.27/arch/s390/kernel/
Dtime.c231 nsecps = (u64) NSEC_PER_SEC << tk->tkr_mono.shift; in update_vsyscall()
244 while (vdso_data->wtom_coarse_nsec >= NSEC_PER_SEC) { in update_vsyscall()
245 vdso_data->wtom_coarse_nsec -= NSEC_PER_SEC; in update_vsyscall()
/linux-4.1.27/drivers/net/ethernet/sfc/
Dptp.c428 #define NS_TO_S27_MULT (((1ULL << 63) + NSEC_PER_SEC / 2) / NSEC_PER_SEC)
456 u32 ns = (u32)(((u64)nic_minor * NSEC_PER_SEC + in efx_ptp_s27_to_ktime()
689 end_ns += NSEC_PER_SEC; in efx_ptp_read_timeset()
/linux-4.1.27/drivers/iio/adc/
Dcc10001_adc.c368 adc_dev->eoc_delay_ns = NSEC_PER_SEC / adc_clk_rate; in cc10001_adc_probe()
/linux-4.1.27/arch/x86/xen/
Dtime.c486 clocksource_register_hz(&xen_clocksource, NSEC_PER_SEC); in xen_time_init()
/linux-4.1.27/fs/
Dselect.c61 if (tv->tv_sec > MAX_SLACK / (NSEC_PER_SEC/divfactor)) in __estimate_accuracy()
65 slack += tv->tv_sec * (NSEC_PER_SEC/divfactor); in __estimate_accuracy()
/linux-4.1.27/tools/perf/util/
Dutil.c459 *ptime = time_sec * NSEC_PER_SEC + time_nsec; in parse_nsec_time()
/linux-4.1.27/kernel/
Dwatchdog.c182 sample_period = get_softlockup_thresh() * ((u64)NSEC_PER_SEC / 5); in set_sample_period()
Dsysctl.c264 static int max_sched_granularity_ns = NSEC_PER_SEC; /* 1 second */
266 static int max_wakeup_granularity_ns = NSEC_PER_SEC; /* 1 second */
/linux-4.1.27/drivers/net/ethernet/octeon/
Docteon_mgmt.c716 u64 clock_comp = (NSEC_PER_SEC << 32) / octeon_get_io_clock_rate(); in octeon_mgmt_ioctl_hwtstamp()
720 (NSEC_PER_SEC << 32) / clock_comp); in octeon_mgmt_ioctl_hwtstamp()
726 (NSEC_PER_SEC << 32) / clock_comp); in octeon_mgmt_ioctl_hwtstamp()
/linux-4.1.27/drivers/media/pci/cx88/
Dcx88-input.c551 ev.duration = (bits * (NSEC_PER_SEC / 1000)) / ir_samplerate; in cx88_ir_irq()
/linux-4.1.27/drivers/input/keyboard/
Dpmic8xxx-keypad.c446 cycles = (row_hold_ns * KEYP_CLOCK_FREQ) / NSEC_PER_SEC; in pmic8xxx_kpd_init()
/linux-4.1.27/drivers/mmc/host/
Domap.c180 tick_ns = DIV_ROUND_UP(NSEC_PER_SEC, slot->fclk_freq); in mmc_omap_fclk_offdelay()
438 tick_ns = DIV_ROUND_UP(NSEC_PER_SEC, slot->fclk_freq); in mmc_omap_send_stop_work()
Dmmci.c798 do_div(clks, NSEC_PER_SEC); in mmci_start_data()
/linux-4.1.27/arch/powerpc/kernel/
Dtime.c801 BUG_ON(wall_time->tv_nsec >= NSEC_PER_SEC); in update_vsyscall_old()
Dasm-offsets.c426 DEFINE(NSEC_PER_SEC, NSEC_PER_SEC); in main()
/linux-4.1.27/drivers/video/fbdev/msm/
Dmsm_fb.c287 ktime_set(0, NSEC_PER_SEC/60), in msmfb_pan_update()
/linux-4.1.27/arch/x86/lguest/
Dboot.c1046 clocksource_register_hz(&lguest_clock, NSEC_PER_SEC); in lguest_time_init()
/linux-4.1.27/drivers/scsi/ufs/
Dufs-qcom.c350 core_clk_period_in_ns = NSEC_PER_SEC / core_clk_rate; in ufs_qcom_cfg_timers()
/linux-4.1.27/drivers/pci/
Dxen-pcifront.c138 ns_timeout = timeval_to_ns(&tv) + 2 * (s64)NSEC_PER_SEC; in do_pci_op()
/linux-4.1.27/drivers/hwmon/
Dibmaem.c867 (unsigned long long)div64_u64(delta * NSEC_PER_SEC, time)); in aem_show_power()
/linux-4.1.27/drivers/net/ethernet/amd/xgbe/
Dxgbe-dev.c1231 nsec *= NSEC_PER_SEC; in xgbe_get_tstamp_time()
1247 nsec *= NSEC_PER_SEC; in xgbe_get_tx_tstamp()
/linux-4.1.27/kernel/events/
Dcore.c185 #define DEFAULT_SAMPLE_PERIOD_NS (NSEC_PER_SEC / DEFAULT_MAX_SAMPLE_RATE)
217 perf_sample_period_ns = NSEC_PER_SEC / sysctl_perf_event_sample_rate; in perf_proc_update_handler()
296 perf_sample_period_ns = NSEC_PER_SEC / sysctl_perf_event_sample_rate; in perf_sample_event_took()
2859 u64 sec = NSEC_PER_SEC; in perf_calculate_period()
6936 event->attr.sample_period = NSEC_PER_SEC / freq; in perf_swevent_init_hrtimer()
/linux-4.1.27/drivers/mtd/nand/
Dsunxi_nand.c877 chip->clk_rate = (2 * NSEC_PER_SEC) / min_clk_period; in sunxi_nand_chip_set_timings()
/linux-4.1.27/drivers/gpu/drm/tegra/
Ddsi.c917 state->period = DIV_ROUND_CLOSEST(NSEC_PER_SEC, plld); in tegra_dsi_encoder_atomic_check()
/linux-4.1.27/net/core/
Dpktgen.c1020 pkt_dev->delay = NSEC_PER_SEC/value; in pktgen_if_write()
3173 pps = div64_u64(pkt_dev->sofar * NSEC_PER_SEC, in show_results()
/linux-4.1.27/fs/ext4/
Dext4.h1428 return (inode->i_sb->s_time_gran < NSEC_PER_SEC) ? in ext4_current_time()
/linux-4.1.27/fs/logfs/
Dreadwrite.c111 return cpu_to_be64((u64)tsp.tv_sec * NSEC_PER_SEC + tsp.tv_nsec); in timespec_to_be64()
/linux-4.1.27/drivers/crypto/
Dhifn_795x.c824 dev->rng_wait_time = DIV_ROUND_UP_ULL(NSEC_PER_SEC, in hifn_register_rng()
/linux-4.1.27/fs/btrfs/
Ddisk-io.c2544 fs_info->avg_delayed_ref_runtime = NSEC_PER_SEC >> 6; /* div by 64 */ in open_ctree()
Dextent-tree.c2702 if (num_entries * avg_runtime >= NSEC_PER_SEC) in btrfs_should_throttle_delayed_refs()
2704 if (val >= NSEC_PER_SEC / 2) in btrfs_should_throttle_delayed_refs()
/linux-4.1.27/fs/nfs/
Dnfs4proc.c4959 verf[1] = cpu_to_be32(NSEC_PER_SEC + 1); in nfs4_init_boot_verifier()