Home
last modified time | relevance | path

Searched refs:nsecs (Results 1 – 25 of 64) sorted by relevance

123

/linux/tools/perf/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/
H A DUtil.pm32 sub nsecs subroutine
34 my ($secs, $nsecs) = @_;
36 return $secs * $NSECS_PER_SEC + $nsecs;
40 my ($nsecs) = @_;
42 return $nsecs / $NSECS_PER_SEC;
46 my ($nsecs) = @_;
48 return $nsecs % $NSECS_PER_SEC;
52 my ($nsecs) = @_;
54 my $str = sprintf("%5u.%09u", nsecs_secs($nsecs), nsecs_nsecs($nsecs));
/linux/drivers/spi/
H A Dspi-gpio.c88 #define spidelay(nsecs) do {} while (0) argument
107 unsigned int nsecs, u32 word, u8 bits, unsigned int flags) in spi_gpio_txrx_word_mode0() argument
110 return bitbang_txrx_le_cpha0(spi, nsecs, 0, flags, word, bits); in spi_gpio_txrx_word_mode0()
112 return bitbang_txrx_be_cpha0(spi, nsecs, 0, flags, word, bits); in spi_gpio_txrx_word_mode0()
116 unsigned int nsecs, u32 word, u8 bits, unsigned int flags) in spi_gpio_txrx_word_mode1() argument
119 return bitbang_txrx_le_cpha1(spi, nsecs, 0, flags, word, bits); in spi_gpio_txrx_word_mode1()
121 return bitbang_txrx_be_cpha1(spi, nsecs, 0, flags, word, bits); in spi_gpio_txrx_word_mode1()
125 unsigned int nsecs, u32 word, u8 bits, unsigned int flags) in spi_gpio_txrx_word_mode2() argument
128 return bitbang_txrx_le_cpha0(spi, nsecs, 1, flags, word, bits); in spi_gpio_txrx_word_mode2()
130 return bitbang_txrx_be_cpha0(spi, nsecs, 1, flags, word, bits); in spi_gpio_txrx_word_mode2()
[all …]
H A Dspi-bitbang-txrx.h50 unsigned nsecs, unsigned cpol, unsigned flags, in bitbang_txrx_be_cpha0() argument
66 spidelay(nsecs); /* T(setup) */ in bitbang_txrx_be_cpha0()
69 spidelay(nsecs); in bitbang_txrx_be_cpha0()
82 unsigned nsecs, unsigned cpol, unsigned flags, in bitbang_txrx_be_cpha1() argument
99 spidelay(nsecs); /* T(setup) */ in bitbang_txrx_be_cpha1()
102 spidelay(nsecs); in bitbang_txrx_be_cpha1()
114 unsigned int nsecs, unsigned int cpol, unsigned int flags, in bitbang_txrx_le_cpha0() argument
131 spidelay(nsecs); /* T(setup) */ in bitbang_txrx_le_cpha0()
134 spidelay(nsecs); in bitbang_txrx_le_cpha0()
147 unsigned int nsecs, unsigned int cpol, unsigned int flags, in bitbang_txrx_le_cpha1() argument
[all …]
H A Dspi-bitbang.c46 unsigned int nsecs; /* (clock cycle time) / 2 */ member
174 cs->nsecs = (NSEC_PER_SEC / 2) / hz; in spi_bitbang_setup_transfer()
175 if (cs->nsecs > (MAX_UDELAY_MS * NSEC_PER_MSEC)) in spi_bitbang_setup_transfer()
219 dev_dbg(&spi->dev, "%s, %u nsec/bit\n", __func__, 2 * cs->nsecs); in spi_bitbang_setup()
242 unsigned int nsecs = cs->nsecs; in spi_bitbang_bufs() local
258 return cs->txrx_bufs(spi, cs->txrx_word, nsecs, t, flags); in spi_bitbang_bufs()
260 return cs->txrx_bufs(spi, cs->txrx_word, nsecs, t, 0); in spi_bitbang_bufs()
/linux/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/
H A DUtil.py23 def nsecs(secs, nsecs): argument
24 return secs * NSECS_PER_SEC + nsecs
26 def nsecs_secs(nsecs): argument
27 return nsecs / NSECS_PER_SEC
29 def nsecs_nsecs(nsecs): argument
30 return nsecs % NSECS_PER_SEC
32 def nsecs_str(nsecs): argument
33 str = "%5u.%09u" % (nsecs_secs(nsecs), nsecs_nsecs(nsecs)),
H A DCore.py107 self.nsecs = common_nsecs
113 return (self.secs * (10 ** 9)) + self.nsecs
116 return "%d.%d" % (self.secs, int(self.nsecs / 1000))
/linux/arch/um/os-Linux/
H A Dtime.c61 int os_timer_set_interval(int cpu, unsigned long long nsecs) in os_timer_set_interval() argument
65 its.it_value.tv_sec = nsecs / UM_NSEC_PER_SEC; in os_timer_set_interval()
66 its.it_value.tv_nsec = nsecs % UM_NSEC_PER_SEC; in os_timer_set_interval()
68 its.it_interval.tv_sec = nsecs / UM_NSEC_PER_SEC; in os_timer_set_interval()
69 its.it_interval.tv_nsec = nsecs % UM_NSEC_PER_SEC; in os_timer_set_interval()
77 int os_timer_one_shot(int cpu, unsigned long long nsecs) in os_timer_one_shot() argument
80 .it_value.tv_sec = nsecs / UM_NSEC_PER_SEC, in os_timer_one_shot()
81 .it_value.tv_nsec = nsecs % UM_NSEC_PER_SEC, in os_timer_one_shot()
/linux/arch/s390/lib/
H A Ddelay.c40 void __ndelay(unsigned long nsecs) in __ndelay() argument
42 nsecs <<= 9; in __ndelay()
43 do_div(nsecs, 125); in __ndelay()
44 delay_loop(nsecs); in __ndelay()
/linux/net/netfilter/
H A Dnft_limit.c27 u64 nsecs; member
73 if (check_mul_overflow(unit, NSEC_PER_SEC, &priv->nsecs)) in nft_limit_init()
86 u64 tmp = div64_u64(priv->nsecs, priv->rate); in nft_limit_init()
97 if (check_mul_overflow(priv->nsecs, rate_with_burst, &tmp)) in nft_limit_init()
130 u64 secs = div_u64(priv->nsecs, NSEC_PER_SEC); in nft_limit_dump()
157 priv_dst->nsecs = priv_src->nsecs; in nft_limit_clone()
206 priv->cost = div64_u64(priv->limit.nsecs, priv->limit.rate); in nft_limit_pkts_init()
254 u64 cost = div64_u64(priv->nsecs * pkt->skb->len, priv->rate); in nft_limit_bytes_eval()
351 priv->cost = div64_u64(priv->limit.nsecs, priv->limit.rate); in nft_limit_obj_pkts_init()
387 u64 cost = div64_u64(priv->nsecs * pkt->skb->len, priv->rate); in nft_limit_obj_bytes_eval()
/linux/arch/um/include/asm/
H A Ddelay.h7 static inline void um_ndelay(unsigned long nsecs) in um_ndelay() argument
11 time_travel_ndelay(nsecs); in um_ndelay()
14 ndelay(nsecs); in um_ndelay()
/linux/arch/alpha/lib/
H A Dudelay.c51 ndelay(unsigned long nsecs) in ndelay() argument
53 nsecs *= (((unsigned long)HZ << 32) / 1000000000) * LPJ; in ndelay()
54 __delay((long)nsecs >> 32); in ndelay()
/linux/tools/perf/scripts/python/
H A Dnetdev-times.py235 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec)
241 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec)
247 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec)
252 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm,
257 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, irq, ret)
262 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm,
268 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm,
274 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm,
280 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm,
286 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm,
[all …]
H A Dcompaction-times.py96 def complete(self, secs, nsecs): argument
97 self.ns = ns(secs, nsecs) - self.ns
141 def complete_pending(cls, pid, secs, nsecs): argument
145 head.make_complete(secs, nsecs)
172 def mark_pending(self, secs, nsecs): argument
173 self.pending = cnode(ns(secs, nsecs))
178 def make_complete(self, secs, nsecs): argument
179 self.pending.complete(secs, nsecs)
H A Dpowerpc-hcalls.py176 diff = nsecs(sec, nsec) - d_enter[cpu][opcode]
200 d_enter[cpu][opcode] = nsecs(sec, nsec)
202 d_enter[cpu] = {opcode: nsecs(sec, nsec)}
H A Dfutex-contention.py37 thread_blocktime[tid] = nsecs(s, ns)
43 elapsed = nsecs(s, ns) - thread_blocktime[tid]
/linux/tools/perf/Documentation/
H A Dperf-script-perl.txt99 $common_nsecs the nsecs portion of the event timestamp
208 nsecs($secs, $nsecs) - returns total nsecs given secs/nsecs pair
209 nsecs_secs($nsecs) - returns whole secs portion given nsecs
210 nsecs_nsecs($nsecs) - returns nsecs remainder given nsecs
211 nsecs_str($nsecs) - returns printable string in the form secs.nsecs
/linux/kernel/time/
H A Dtimekeeping.c797 u64 nsecs; in ktime_get_real_ts64() local
805 nsecs = timekeeping_get_ns(&tk->tkr_mono); in ktime_get_real_ts64()
810 timespec64_add_ns(ts, nsecs); in ktime_get_real_ts64()
819 u64 nsecs; in ktime_get() local
826 nsecs = timekeeping_get_ns(&tk->tkr_mono); in ktime_get()
830 return ktime_add_ns(base, nsecs); in ktime_get()
838 u32 nsecs; in ktime_get_resolution_ns() local
844 nsecs = tk->tkr_mono.mult >> tk->tkr_mono.shift; in ktime_get_resolution_ns()
847 return nsecs; in ktime_get_resolution_ns()
862 u64 nsecs; in ktime_get_with_offset() local
[all …]
/linux/arch/sh/lib/
H A Ddelay.c50 void __ndelay(unsigned long nsecs) in __ndelay() argument
52 __const_udelay(nsecs * 0x00000005); in __ndelay()
/linux/arch/x86/um/
H A Ddelay.c53 void __ndelay(unsigned long nsecs) in __ndelay() argument
55 __const_udelay(nsecs * 0x00005); /* 2**32 / 1000000000 (rounded up) */ in __ndelay()
/linux/arch/csky/lib/
H A Ddelay.c35 void __ndelay(unsigned long nsecs) in __ndelay() argument
37 __const_udelay(nsecs * 0x5UL); /* 2**32 / 1000000000 (rounded up) */ in __ndelay()
/linux/arch/arm/mach-omap1/
H A Dtimer32k.c193 unsigned long long nsecs; in omap_read_persistent_clock64() local
199 nsecs = clocksource_cyc2ns(cycles - last_cycles, in omap_read_persistent_clock64()
202 timespec64_add_ns(&persistent_ts, nsecs); in omap_read_persistent_clock64()
/linux/arch/nios2/lib/
H A Ddelay.c36 void __ndelay(unsigned long nsecs) in __ndelay() argument
38 __const_udelay(nsecs * 0x5UL); /* 2**32 / 1000000000 (rounded up) */ in __ndelay()
/linux/arch/openrisc/lib/
H A Ddelay.c55 void __ndelay(unsigned long nsecs) in __ndelay() argument
57 __const_udelay(nsecs * 0x5UL); /* 2**32 / 1000000000 (rounded up) */ in __ndelay()
/linux/arch/arm64/lib/
H A Ddelay.c65 void __ndelay(unsigned long nsecs) in __ndelay() argument
67 __const_udelay(nsecs * 0x5UL); /* 2**32 / 1000000000 (rounded up) */ in __ndelay()
/linux/arch/riscv/lib/
H A Ddelay.c102 void ndelay(unsigned long nsecs) in ndelay() argument
108 unsigned long long ncycles = nsecs * lpj_fine * NDELAY_MULT; in ndelay()

123