Home
last modified time | relevance | path

Searched refs:nsec (Results 1 - 25 of 338) sorted by relevance

12345678910>>...14

/kernel/linux/linux-5.10/kernel/time/
H A Dvsyscall.c22 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 in update_vdso_data()
77 u64 nsec; update_vsyscall() local
[all...]
H A Dtimecounter.c14 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, fra in timecounter_cyc2time() local
[all...]
H A Dtime.c452 struct __kernel_old_timeval ns_to_kernel_old_timeval(const s64 nsec) in ns_to_kernel_old_timeval() argument
454 struct timespec64 ts = ns_to_timespec64(nsec); in ns_to_kernel_old_timeval()
465 * set_normalized_timespec - set timespec sec and nsec parts and normalize
469 * @nsec: nanoseconds to set
478 void set_normalized_timespec64(struct timespec64 *ts, time64_t sec, s64 nsec) in set_normalized_timespec64() argument
480 while (nsec >= NSEC_PER_SEC) { in set_normalized_timespec64()
486 asm("" : "+rm"(nsec)); in set_normalized_timespec64()
487 nsec -= NSEC_PER_SEC; in set_normalized_timespec64()
490 while (nsec < 0) { in set_normalized_timespec64()
491 asm("" : "+rm"(nsec)); in set_normalized_timespec64()
506 ns_to_timespec64(const s64 nsec) ns_to_timespec64() argument
591 long nsec = value->tv_nsec + TICK_NSEC - 1; timespec64_to_jiffies() local
[all...]
/kernel/linux/linux-6.6/kernel/time/
H A Dvsyscall.c22 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 in update_vdso_data()
77 u64 nsec; update_vsyscall() local
[all...]
H A Dtimecounter.c14 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, fra in timecounter_cyc2time() local
[all...]
/kernel/linux/linux-5.10/tools/testing/radix-tree/
H A Dbenchmark.c19 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
99 long long nsec; benchmark_delete() local
[all...]
/kernel/linux/linux-6.6/tools/testing/radix-tree/
H A Dbenchmark.c19 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
99 long long nsec; benchmark_delete() local
[all...]
/kernel/linux/linux-5.10/security/selinux/
H A Dnetnode.c45 struct netnode_security_struct nsec; member
122 if (node->nsec.family == family) in sel_netnode_find()
125 if (node->nsec.addr.ipv4 == *(__be32 *)addr) in sel_netnode_find()
129 if (ipv6_addr_equal(&node->nsec.addr.ipv6, in sel_netnode_find()
150 switch (node->nsec.family) { in sel_netnode_insert()
152 idx = sel_netnode_hashfn_ipv4(node->nsec.addr.ipv4); in sel_netnode_insert()
155 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 in sel_netnode_sid_slow()
[all...]
H A Dnetif.c34 struct netif_security_struct nsec; member
75 if (net_eq(netif->nsec.ns, ns) && in sel_netif_find()
76 netif->nsec.ifindex == ifindex) in sel_netif_find()
98 idx = sel_netif_hashfn(netif->nsec.ns, netif->nsec.ifindex); in sel_netif_insert()
153 *sid = netif->nsec.sid; in sel_netif_sid_slow()
162 new->nsec.ns = ns; in sel_netif_sid_slow()
163 new->nsec.ifindex = ifindex; in sel_netif_sid_slow()
164 new->nsec.sid = *sid; in sel_netif_sid_slow()
199 *sid = netif->nsec in sel_netif_sid()
[all...]
/kernel/linux/linux-6.6/security/selinux/
H A Dnetnode.c45 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 in sel_netnode_sid_slow()
[all...]
H A Dnetif.c34 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 in sel_netif_sid()
[all...]
/third_party/ltp/lib/newlib_tests/
H A Dtest_timer.c81 long long nsec = tst_ts_get_nsec(ts); in test_add_sub() local
84 if (sec != 1 || nsec != 0) in test_add_sub()
85 tst_res(TFAIL, "sec = %lli, nsec = %lli", sec, nsec); in test_add_sub()
87 tst_res(TPASS, "sec = %lli, nsec = %lli", sec, nsec); in test_add_sub()
93 nsec = tst_ts_get_nsec(ts); in test_add_sub()
96 if (sec != 0 || nsec != 999999000) in test_add_sub()
97 tst_res(TFAIL, "sec = %lli, nsec = %lli", sec, nsec); in test_add_sub()
[all...]
/kernel/linux/linux-5.10/arch/xtensa/include/asm/
H A Ddelay.h55 static inline void __ndelay(unsigned long nsec) in __ndelay() argument
59 * for legitimate nsec values in __ndelay()
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()
/kernel/linux/linux-6.6/arch/xtensa/include/asm/
H A Ddelay.h55 static inline void __ndelay(unsigned long nsec) in __ndelay() argument
59 * for legitimate nsec values in __ndelay()
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()
/kernel/linux/linux-6.6/drivers/net/ethernet/amd/xgbe/
H A Dxgbe-ptp.c130 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()
/kernel/linux/linux-5.10/tools/perf/scripts/python/
H A Dnetdev-times.py59 # Calculate a time interval(msec) from src(nsec) to dst(nsec)
232 def irq__softirq_entry(name, context, cpu, sec, nsec, pid, comm, callchain, vec):
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):
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):
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,
252 event_info = (name, context, cpu, nsecs(sec, nsec), pi
[all...]
/kernel/linux/linux-6.6/tools/perf/scripts/python/
H A Dnetdev-times.py59 # Calculate a time interval(msec) from src(nsec) to dst(nsec)
232 def irq__softirq_entry(name, context, cpu, sec, nsec, pid, comm, callchain, vec):
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):
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):
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,
252 event_info = (name, context, cpu, nsecs(sec, nsec), pi
[all...]
/kernel/linux/linux-5.10/drivers/net/ethernet/stmicro/stmmac/
H A Dstmmac_hwtstamp.c60 static int init_systime(void __iomem *ioaddr, u32 sec, u32 nsec) in init_systime() argument
65 writel(nsec, ioaddr + PTP_STNSUR); in init_systime()
101 static int adjust_systime(void __iomem *ioaddr, u32 sec, u32 nsec, in adjust_systime() argument
117 nsec = (PTP_DIGITAL_ROLLOVER_MODE - nsec); in adjust_systime()
119 nsec = (PTP_BINARY_ROLLOVER_MODE - nsec); in adjust_systime()
123 value = (add_sub << PTP_STNSUR_ADDSUB_SHIFT) | nsec; in adjust_systime()
/third_party/selinux/libsepol/src/
H A Dmodule.c380 uint32_t *buf = NULL, nsec; in module_package_read_offsets() local
404 nsec = *sections = le32_to_cpu(buf[2]); in module_package_read_offsets()
406 if (nsec > MAXSECTIONS) { in module_package_read_offsets()
408 nsec); in module_package_read_offsets()
412 off = (size_t *) calloc(nsec + 1, sizeof(size_t)); in module_package_read_offsets()
419 buf = calloc(nsec, sizeof(uint32_t)); in module_package_read_offsets()
424 rc = next_entry(buf, file, sizeof(uint32_t) * nsec); in module_package_read_offsets()
430 for (i = 0; i < nsec; i++) { in module_package_read_offsets()
440 rc = policy_file_length(file, &off[nsec]); in module_package_read_offsets()
444 if (nsec in module_package_read_offsets()
471 uint32_t buf[1], nsec; sepol_module_package_read() local
657 uint32_t buf[5], len, nsec; sepol_module_package_info() local
870 uint32_t buf[5], offsets[5], len, nsec = 0; sepol_module_package_write() local
[all...]
/kernel/linux/linux-5.10/drivers/net/ethernet/amd/xgbe/
H A Dxgbe-ptp.c130 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()
188 u64 nsec; in xgbe_gettime() local
192 nsec = timecounter_read(&pdata->tstamp_tc); in xgbe_gettime()
196 *ts = ns_to_timespec64(nsec); in xgbe_gettime()
208 u64 nsec; in xgbe_settime() local
210 nsec = timespec64_to_ns(ts); in xgbe_settime()
214 timecounter_init(&pdata->tstamp_tc, &pdata->tstamp_cc, nsec); in xgbe_settime()
/kernel/linux/linux-5.10/tools/testing/selftests/mqueue/
H A Dmq_perf_tests.c358 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
449 printf("\t\tClock resolution:\t\t%lu nsec%s\n", res.tv_nsec, in perf_test_thread()
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 in perf_test_thread()
[all...]
/kernel/linux/linux-6.6/tools/testing/selftests/mqueue/
H A Dmq_perf_tests.c358 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
449 printf("\t\tClock resolution:\t\t%lu nsec%s\n", res.tv_nsec, in perf_test_thread()
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 in perf_test_thread()
[all...]
/kernel/linux/linux-6.6/tools/testing/selftests/ptp/
H A Dtestptp.c113 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...]
/kernel/linux/linux-5.10/drivers/pps/
H A Dkapi.c29 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()
/kernel/linux/linux-6.6/drivers/pps/
H A Dkapi.c29 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()

Completed in 13 milliseconds

12345678910>>...14