/linux-6.6.21/kernel/time/ |
D | vsyscall.c | 22 u64 nsec, sec; in update_vdso_data() local 37 nsec = tk->tkr_mono.xtime_nsec; in update_vdso_data() 38 nsec += ((u64)tk->wall_to_monotonic.tv_nsec << tk->tkr_mono.shift); in update_vdso_data() 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() 43 vdso_ts->nsec = nsec; in update_vdso_data() 49 nsec += (u64)tk->monotonic_to_boot.tv_nsec << 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() 59 vdso_ts->nsec = nsec; in update_vdso_data() [all …]
|
D | timecounter.c | 14 tc->nsec = start_tstamp; in timecounter_init() 54 u64 nsec; in timecounter_read() local 57 nsec = timecounter_read_delta(tc); in timecounter_read() 58 nsec += tc->nsec; in timecounter_read() 59 tc->nsec = nsec; in timecounter_read() 61 return nsec; in timecounter_read() 83 u64 nsec = tc->nsec, frac = tc->frac; in timecounter_cyc2time() local 92 nsec -= cc_cyc2ns_backwards(tc->cc, delta, tc->mask, frac); in timecounter_cyc2time() 94 nsec += cyclecounter_cyc2ns(tc->cc, delta, tc->mask, &frac); in timecounter_cyc2time() 97 return nsec; in timecounter_cyc2time()
|
D | time.c | 470 struct __kernel_old_timeval ns_to_kernel_old_timeval(s64 nsec) in ns_to_kernel_old_timeval() argument 472 struct timespec64 ts = ns_to_timespec64(nsec); in ns_to_kernel_old_timeval() 495 void set_normalized_timespec64(struct timespec64 *ts, time64_t sec, s64 nsec) in set_normalized_timespec64() argument 497 while (nsec >= NSEC_PER_SEC) { in set_normalized_timespec64() 503 asm("" : "+rm"(nsec)); in set_normalized_timespec64() 504 nsec -= NSEC_PER_SEC; in set_normalized_timespec64() 507 while (nsec < 0) { in set_normalized_timespec64() 508 asm("" : "+rm"(nsec)); in set_normalized_timespec64() 509 nsec += NSEC_PER_SEC; in set_normalized_timespec64() 513 ts->tv_nsec = nsec; in set_normalized_timespec64() [all …]
|
/linux-6.6.21/Documentation/sound/designs/ |
D | timestamping.rst | 152 playback: systime: 341121338 nsec, audio time 342000000 nsec, systime delta -878662 153 playback: systime: 426236663 nsec, audio time 427187500 nsec, systime delta -950837 154 playback: systime: 597080580 nsec, audio time 598000000 nsec, systime delta -919420 155 playback: systime: 682059782 nsec, audio time 683020833 nsec, systime delta -961051 156 playback: systime: 852896415 nsec, audio time 853854166 nsec, systime delta -957751 157 playback: systime: 937903344 nsec, audio time 938854166 nsec, systime delta -950822 163 playback: systime: 341053347 nsec, audio time 341062500 nsec, systime delta -9153 164 playback: systime: 426072447 nsec, audio time 426062500 nsec, systime delta 9947 165 playback: systime: 596899518 nsec, audio time 596895833 nsec, systime delta 3685 166 playback: systime: 681915317 nsec, audio time 681916666 nsec, systime delta -1349 [all …]
|
/linux-6.6.21/tools/testing/radix-tree/ |
D | benchmark.c | 19 long long nsec; in benchmark_iter() local 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() 48 nsec /= loops; in benchmark_iter() 49 return nsec; in benchmark_iter() 57 long long nsec; in benchmark_insert() local 66 nsec = (finish.tv_sec - start.tv_sec) * NSEC_PER_SEC + in benchmark_insert() 70 size, step, nsec); in benchmark_insert() 78 long long nsec; in benchmark_tagging() local [all …]
|
/linux-6.6.21/security/selinux/ |
D | netnode.c | 45 struct netnode_security_struct nsec; member 121 if (node->nsec.family == family) in sel_netnode_find() 124 if (node->nsec.addr.ipv4 == *(const __be32 *)addr) in sel_netnode_find() 128 if (ipv6_addr_equal(&node->nsec.addr.ipv6, in sel_netnode_find() 149 switch (node->nsec.family) { in sel_netnode_insert() 151 idx = sel_netnode_hashfn_ipv4(node->nsec.addr.ipv4); in sel_netnode_insert() 154 idx = sel_netnode_hashfn_ipv6(&node->nsec.addr.ipv6); in sel_netnode_insert() 199 *sid = node->nsec.sid; in sel_netnode_sid_slow() 210 new->nsec.addr.ipv4 = *(__be32 *)addr; in sel_netnode_sid_slow() 216 new->nsec.addr.ipv6 = *(struct in6_addr *)addr; in sel_netnode_sid_slow() [all …]
|
D | netif.c | 34 struct netif_security_struct nsec; member 74 if (net_eq(netif->nsec.ns, ns) && in sel_netif_find() 75 netif->nsec.ifindex == ifindex) in sel_netif_find() 97 idx = sel_netif_hashfn(netif->nsec.ns, netif->nsec.ifindex); in sel_netif_insert() 152 *sid = netif->nsec.sid; in sel_netif_sid_slow() 161 new->nsec.ns = ns; in sel_netif_sid_slow() 162 new->nsec.ifindex = ifindex; in sel_netif_sid_slow() 163 new->nsec.sid = *sid; in sel_netif_sid_slow() 198 *sid = netif->nsec.sid; in sel_netif_sid()
|
/linux-6.6.21/arch/xtensa/include/asm/ |
D | delay.h | 55 static inline void __ndelay(unsigned long nsec) in __ndelay() argument 61 unsigned long cycles = (nsec * (ccount_freq >> 15)) >> 15; in __ndelay() 67 static inline void ndelay(unsigned long nsec) in ndelay() argument 69 if (__builtin_constant_p(nsec) && nsec >= __MAX_NDELAY) in ndelay() 72 __ndelay(nsec); in ndelay()
|
/linux-6.6.21/tools/perf/scripts/python/ |
D | netdev-times.py | 232 def irq__softirq_entry(name, context, cpu, sec, nsec, pid, comm, callchain, vec): argument 235 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec) 238 def irq__softirq_exit(name, context, cpu, sec, nsec, pid, comm, callchain, vec): argument 241 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec) 244 def irq__softirq_raise(name, context, cpu, sec, nsec, pid, comm, callchain, vec): argument 247 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec) 250 def irq__irq_handler_entry(name, context, cpu, sec, nsec, pid, comm, argument 252 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, 256 def irq__irq_handler_exit(name, context, cpu, sec, nsec, pid, comm, callchain, irq, ret): argument 257 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, irq, ret) [all …]
|
D | powerpc-hcalls.py | 173 def powerpc__hcall_exit(name, context, cpu, sec, nsec, pid, comm, callchain, argument 176 diff = nsecs(sec, nsec) - d_enter[cpu][opcode] 197 def powerpc__hcall_entry(event_name, context, cpu, sec, nsec, pid, comm, argument 200 d_enter[cpu][opcode] = nsecs(sec, nsec) 202 d_enter[cpu] = {opcode: nsecs(sec, nsec)}
|
/linux-6.6.21/drivers/net/ethernet/amd/xgbe/ |
D | xgbe-ptp.c | 130 u64 nsec; in xgbe_cc_read() local 132 nsec = pdata->hw_if.get_tstamp_time(pdata); in xgbe_cc_read() 134 return nsec; in xgbe_cc_read() 176 u64 nsec; in xgbe_gettime() local 180 nsec = timecounter_read(&pdata->tstamp_tc); in xgbe_gettime() 184 *ts = ns_to_timespec64(nsec); in xgbe_gettime() 196 u64 nsec; in xgbe_settime() local 198 nsec = timespec64_to_ns(ts); in xgbe_settime() 202 timecounter_init(&pdata->tstamp_tc, &pdata->tstamp_cc, nsec); in xgbe_settime()
|
/linux-6.6.21/lib/ |
D | crc32test.c | 669 u64 nsec; in crc32c_test() local 687 nsec = ktime_get_ns(); in crc32c_test() 693 nsec = ktime_get_ns() - nsec; in crc32c_test() 703 bytes, nsec); in crc32c_test() 749 u64 nsec; in crc32_test() local 770 nsec = ktime_get_ns(); in crc32_test() 780 nsec = ktime_get_ns() - nsec; in crc32_test() 791 bytes, nsec); in crc32_test()
|
/linux-6.6.21/tools/testing/selftests/ptp/ |
D | testptp.c | 113 return t->sec * NSEC_PER_SEC + t->nsec; in pctns() 433 event.t.sec, event.t.nsec); in main() 483 perout_request.period.nsec = perout % NSEC_PER_SEC; in main() 488 perout_request.on.nsec = pulsewidth % NSEC_PER_SEC; in main() 493 perout_request.phase.nsec = perout_phase % NSEC_PER_SEC; in main() 496 perout_request.start.nsec = 0; in main() 543 (pct+2*i)->sec, (pct+2*i)->nsec); in main() 545 (pct+2*i+1)->sec, (pct+2*i+1)->nsec); in main() 547 (pct+2*i+2)->sec, (pct+2*i+2)->nsec); in main() 573 i, soe->ts[i][0].sec, soe->ts[i][0].nsec); in main() [all …]
|
/linux-6.6.21/tools/testing/selftests/mqueue/ |
D | mq_perf_tests.c | 358 nsec = ((middle.tv_sec - start.tv_sec) * 1000000000) + \ 360 send_total.tv_nsec += nsec; \ 365 nsec = ((end.tv_sec - middle.tv_sec) * 1000000000) + \ 367 recv_total.tv_nsec += nsec; \ 433 unsigned long long nsec; in perf_test_thread() local 465 nsec = ((unsigned long long)send_total.tv_sec * 1000000000 + in perf_test_thread() 467 printf("\t\t\t\t\t\t%lld nsec/msg\n", nsec); in perf_test_thread() 470 nsec = ((unsigned long long)recv_total.tv_sec * 1000000000 + in perf_test_thread() 472 printf("\t\t\t\t\t\t%lld nsec/msg\n", nsec); in perf_test_thread() 491 nsec = ((unsigned long long)(end.tv_sec - start.tv_sec) * in perf_test_thread() [all …]
|
/linux-6.6.21/drivers/pps/ |
D | kapi.c | 29 ts->nsec += offset->nsec; in pps_add_offset() 30 while (ts->nsec >= NSEC_PER_SEC) { in pps_add_offset() 31 ts->nsec -= NSEC_PER_SEC; in pps_add_offset() 34 while (ts->nsec < 0) { in pps_add_offset() 35 ts->nsec += NSEC_PER_SEC; in pps_add_offset() 164 struct pps_ktime ts_real = { .sec = 0, .nsec = 0, .flags = 0 }; in pps_event()
|
/linux-6.6.21/drivers/net/ethernet/stmicro/stmmac/ |
D | stmmac_hwtstamp.c | 105 static int init_systime(void __iomem *ioaddr, u32 sec, u32 nsec) in init_systime() argument 110 writel(nsec, ioaddr + PTP_STNSUR); in init_systime() 146 static int adjust_systime(void __iomem *ioaddr, u32 sec, u32 nsec, in adjust_systime() argument 162 nsec = (PTP_DIGITAL_ROLLOVER_MODE - nsec); in adjust_systime() 164 nsec = (PTP_BINARY_ROLLOVER_MODE - nsec); in adjust_systime() 168 value = (add_sub << PTP_STNSUR_ADDSUB_SHIFT) | nsec; in adjust_systime()
|
/linux-6.6.21/lib/vdso/ |
D | gettimeofday.c | 76 ns = vdso_ts->nsec; in do_hres_timens() 85 ns += offs->nsec; in do_hres_timens() 147 ns = vdso_ts->nsec; in do_hres() 171 u64 nsec; in do_coarse_timens() local 178 nsec = vdso_ts->nsec; in do_coarse_timens() 183 nsec += offs->nsec; in do_coarse_timens() 189 ts->tv_sec = sec + __iter_div_u64_rem(nsec, NSEC_PER_SEC, &nsec); in do_coarse_timens() 190 ts->tv_nsec = nsec; in do_coarse_timens() 221 ts->tv_nsec = vdso_ts->nsec; in do_coarse()
|
/linux-6.6.21/drivers/net/ethernet/mellanox/mlxsw/ |
D | spectrum_ptp.c | 152 static u64 mlxsw_sp1_ptp_ns2cycles(const struct timecounter *tc, u64 nsec) in mlxsw_sp1_ptp_ns2cycles() argument 154 u64 cycles = (u64) nsec; in mlxsw_sp1_ptp_ns2cycles() 163 mlxsw_sp1_ptp_phc_settime(struct mlxsw_sp1_ptp_clock *clock, u64 nsec) in mlxsw_sp1_ptp_phc_settime() argument 171 next_sec = div_u64(nsec, NSEC_PER_SEC) + 1; in mlxsw_sp1_ptp_phc_settime() 208 u64 nsec; in mlxsw_sp1_ptp_adjtime() local 212 nsec = timecounter_read(&clock->tc); in mlxsw_sp1_ptp_adjtime() 215 return mlxsw_sp1_ptp_phc_settime(clock, nsec); in mlxsw_sp1_ptp_adjtime() 223 u64 cycles, nsec; in mlxsw_sp1_ptp_gettimex() local 227 nsec = timecounter_cyc2time(&clock->tc, cycles); in mlxsw_sp1_ptp_gettimex() 230 *ts = ns_to_timespec64(nsec); in mlxsw_sp1_ptp_gettimex() [all …]
|
/linux-6.6.21/drivers/ptp/ |
D | ptp_chardev.c | 219 perout->on.nsec > perout->period.nsec)) { in ptp_ioctl() 232 perout->phase.nsec >= perout->period.nsec)) { in ptp_ioctl() 249 enable = req.perout.period.sec || req.perout.period.nsec; in ptp_ioctl() 283 precise_offset.device.nsec = ts.tv_nsec; in ptp_ioctl() 286 precise_offset.sys_realtime.nsec = ts.tv_nsec; in ptp_ioctl() 289 precise_offset.sys_monoraw.nsec = ts.tv_nsec; in ptp_ioctl() 317 extoff->ts[i][0].nsec = sts.pre_ts.tv_nsec; in ptp_ioctl() 319 extoff->ts[i][1].nsec = ts.tv_nsec; in ptp_ioctl() 321 extoff->ts[i][2].nsec = sts.post_ts.tv_nsec; in ptp_ioctl() 343 pct->nsec = ts.tv_nsec; in ptp_ioctl() [all …]
|
/linux-6.6.21/fs/adfs/ |
D | inode.c | 178 s64 nsec; in adfs_adfs2unix_time() local 189 nsec = (((s64) high << 32) | (s64) low) * 10000000; /* cs to ns */ in adfs_adfs2unix_time() 192 if (nsec < nsec_unix_epoch_diff_risc_os_epoch) in adfs_adfs2unix_time() 196 nsec -= nsec_unix_epoch_diff_risc_os_epoch; in adfs_adfs2unix_time() 198 *tv = ns_to_timespec64(nsec); in adfs_adfs2unix_time() 214 s64 cs, nsec = timespec64_to_ns(ts); in adfs_unix2adfs_time() local 217 nsec += nsec_unix_epoch_diff_risc_os_epoch; in adfs_unix2adfs_time() 220 cs = div_s64(nsec, 10000000); in adfs_unix2adfs_time()
|
/linux-6.6.21/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/ |
D | memx.c | 108 u32 addr, u32 mask, u32 data, u32 nsec) in nvkm_memx_wait() argument 111 addr, mask, data, nsec); in nvkm_memx_wait() 112 memx_cmd(memx, MEMX_WAIT, 4, (u32[]){ addr, mask, data, nsec }); in nvkm_memx_wait() 117 nvkm_memx_nsec(struct nvkm_memx *memx, u32 nsec) in nvkm_memx_nsec() argument 119 nvkm_debug(&memx->pmu->subdev, " DELAY = %d ns\n", nsec); in nvkm_memx_nsec() 120 memx_cmd(memx, MEMX_DELAY, 1, (u32[]){ nsec }); in nvkm_memx_nsec()
|
/linux-6.6.21/drivers/misc/sgi-gru/ |
D | gruhandles.c | 32 unsigned long nsec; in update_mcs_stats() local 34 nsec = CLKS2NSEC(clks); in update_mcs_stats() 36 atomic_long_add(nsec, &mcs_op_statistics[op].total); in update_mcs_stats() 37 if (mcs_op_statistics[op].max < nsec) in update_mcs_stats() 38 mcs_op_statistics[op].max = nsec; in update_mcs_stats()
|
/linux-6.6.21/drivers/gpu/drm/nouveau/nvkm/subdev/timer/ |
D | base.c | 54 nvkm_timer_wait_init(struct nvkm_device *device, u64 nsec, in nvkm_timer_wait_init() argument 58 wait->limit = nsec; in nvkm_timer_wait_init() 106 nvkm_timer_alarm(struct nvkm_timer *tmr, u32 nsec, struct nvkm_alarm *alarm) in nvkm_timer_alarm() argument 119 if (nsec) { in nvkm_timer_alarm() 121 alarm->timestamp = nvkm_timer_read(tmr) + nsec; in nvkm_timer_alarm()
|
/linux-6.6.21/drivers/net/ethernet/microchip/ |
D | lan743x_ptp.c | 195 u32 *sec, u32 *nsec, u32 *sub_nsec); 516 start_sec += perout_request->start.nsec / 1000000000; in lan743x_ptp_perout() 517 start_nsec = perout_request->start.nsec % 1000000000; in lan743x_ptp_perout() 520 period_sec += perout_request->period.nsec / 1000000000; in lan743x_ptp_perout() 521 period_nsec = perout_request->period.nsec % 1000000000; in lan743x_ptp_perout() 529 ts_on.tv_nsec = perout_request->on.nsec; in lan743x_ptp_perout() 532 ts_period.tv_nsec = perout_request->period.nsec; in lan743x_ptp_perout() 745 pulse_sec += perout_request->on.nsec / 1000000000; in lan743x_ptp_io_perout() 746 pulse_nsec = perout_request->on.nsec % 1000000000; in lan743x_ptp_io_perout() 749 pulse_sec += perout_request->period.nsec / 1000000000; in lan743x_ptp_io_perout() [all …]
|
/linux-6.6.21/drivers/net/ethernet/cavium/common/ |
D | cavium_ptp.c | 167 u64 nsec; in cavium_ptp_gettime() local 170 nsec = timecounter_read(&clock->time_counter); in cavium_ptp_gettime() 173 *ts = ns_to_timespec64(nsec); in cavium_ptp_gettime() 189 u64 nsec; in cavium_ptp_settime() local 191 nsec = timespec64_to_ns(ts); in cavium_ptp_settime() 194 timecounter_init(&clock->time_counter, &clock->cycle_counter, nsec); in cavium_ptp_settime()
|