/linux/tools/perf/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/ |
A D | Util.pm | 32 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/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/ |
A D | Util.py | 23 def nsecs(secs, nsecs): function 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)),
|
A D | Core.py | 107 self.nsecs = common_nsecs 113 return (self.secs * (10 ** 9)) + self.nsecs 116 return "%d.%d" % (self.secs, int(self.nsecs / 1000))
|
/linux/drivers/spi/ |
A D | spi-gpio.c | 117 #define spidelay(nsecs) do {} while (0) argument 136 unsigned nsecs, u32 word, u8 bits, unsigned flags) in spi_gpio_txrx_word_mode0() argument 138 return bitbang_txrx_be_cpha0(spi, nsecs, 0, flags, word, bits); in spi_gpio_txrx_word_mode0() 142 unsigned nsecs, u32 word, u8 bits, unsigned flags) in spi_gpio_txrx_word_mode1() argument 144 return bitbang_txrx_be_cpha1(spi, nsecs, 0, flags, word, bits); in spi_gpio_txrx_word_mode1() 148 unsigned nsecs, u32 word, u8 bits, unsigned flags) in spi_gpio_txrx_word_mode2() argument 154 unsigned nsecs, u32 word, u8 bits, unsigned flags) in spi_gpio_txrx_word_mode3() argument 170 unsigned nsecs, u32 word, u8 bits, unsigned flags) in spi_gpio_spec_txrx_word_mode0() argument 177 unsigned nsecs, u32 word, u8 bits, unsigned flags) in spi_gpio_spec_txrx_word_mode1() argument 184 unsigned nsecs, u32 word, u8 bits, unsigned flags) in spi_gpio_spec_txrx_word_mode2() argument [all …]
|
A D | spi-bitbang-txrx.h | 48 unsigned nsecs, unsigned cpol, unsigned flags, in bitbang_txrx_be_cpha0() argument 64 spidelay(nsecs); /* T(setup) */ in bitbang_txrx_be_cpha0() 67 spidelay(nsecs); in bitbang_txrx_be_cpha0() 80 unsigned nsecs, unsigned cpol, unsigned flags, in bitbang_txrx_be_cpha1() argument 97 spidelay(nsecs); /* T(setup) */ in bitbang_txrx_be_cpha1() 100 spidelay(nsecs); in bitbang_txrx_be_cpha1()
|
A D | spi-bitbang.c | 41 unsigned nsecs; /* (clock cycle time)/2 */ member 42 u32 (*txrx_word)(struct spi_device *spi, unsigned nsecs, 47 unsigned nsecs, 57 unsigned nsecs, in bitbang_txrx_8() argument 86 unsigned nsecs, in bitbang_txrx_16() argument 115 unsigned nsecs, in bitbang_txrx_32() argument 171 cs->nsecs = (1000000000/2) / hz; in spi_bitbang_setup_transfer() 172 if (cs->nsecs > (MAX_UDELAY_MS * 1000 * 1000)) in spi_bitbang_setup_transfer() 236 unsigned nsecs = cs->nsecs; in spi_bitbang_bufs() local 252 return cs->txrx_bufs(spi, cs->txrx_word, nsecs, t, flags); in spi_bitbang_bufs() [all …]
|
A D | spi-sh-sci.c | 79 unsigned nsecs, u32 word, u8 bits, in sh_sci_spi_txrx_mode0() argument 82 return bitbang_txrx_be_cpha0(spi, nsecs, 0, flags, word, bits); in sh_sci_spi_txrx_mode0() 86 unsigned nsecs, u32 word, u8 bits, in sh_sci_spi_txrx_mode1() argument 89 return bitbang_txrx_be_cpha1(spi, nsecs, 0, flags, word, bits); in sh_sci_spi_txrx_mode1() 93 unsigned nsecs, u32 word, u8 bits, in sh_sci_spi_txrx_mode2() argument 96 return bitbang_txrx_be_cpha0(spi, nsecs, 1, flags, word, bits); in sh_sci_spi_txrx_mode2() 100 unsigned nsecs, u32 word, u8 bits, in sh_sci_spi_txrx_mode3() argument 103 return bitbang_txrx_be_cpha1(spi, nsecs, 1, flags, word, bits); in sh_sci_spi_txrx_mode3()
|
A D | spi-ath79.c | 63 static inline void ath79_spi_delay(struct ath79_spi *sp, unsigned int nsecs) in ath79_spi_delay() argument 65 if (nsecs > sp->rrw_delay) in ath79_spi_delay() 66 ndelay(nsecs - sp->rrw_delay); in ath79_spi_delay() 107 static u32 ath79_spi_txrx_mode0(struct spi_device *spi, unsigned int nsecs, in ath79_spi_txrx_mode0() argument 124 ath79_spi_delay(sp, nsecs); in ath79_spi_txrx_mode0() 126 ath79_spi_delay(sp, nsecs); in ath79_spi_txrx_mode0()
|
A D | spi-sh-hspi.c | 152 const int nsecs = 50; in hspi_transfer_one_message() local 163 ndelay(nsecs); in hspi_transfer_one_message() 196 ndelay(nsecs); in hspi_transfer_one_message() 198 ndelay(nsecs); in hspi_transfer_one_message() 204 ndelay(nsecs); in hspi_transfer_one_message()
|
/linux/arch/um/os-Linux/ |
A D | time.c | 53 int os_timer_set_interval(unsigned long long nsecs) in os_timer_set_interval() argument 57 its.it_value.tv_sec = nsecs / UM_NSEC_PER_SEC; in os_timer_set_interval() 58 its.it_value.tv_nsec = nsecs % UM_NSEC_PER_SEC; in os_timer_set_interval() 60 its.it_interval.tv_sec = nsecs / UM_NSEC_PER_SEC; in os_timer_set_interval() 61 its.it_interval.tv_nsec = nsecs % UM_NSEC_PER_SEC; in os_timer_set_interval() 69 int os_timer_one_shot(unsigned long long nsecs) in os_timer_one_shot() argument 72 .it_value.tv_sec = nsecs / UM_NSEC_PER_SEC, in os_timer_one_shot() 73 .it_value.tv_nsec = nsecs % UM_NSEC_PER_SEC, in os_timer_one_shot()
|
/linux/arch/s390/lib/ |
A D | delay.c | 43 void __ndelay(unsigned long nsecs) in __ndelay() argument 45 nsecs <<= 9; in __ndelay() 46 do_div(nsecs, 125); in __ndelay() 47 delay_loop(nsecs); in __ndelay()
|
/linux/net/netfilter/ |
A D | nft_limit.c | 23 u64 nsecs; member 65 limit->nsecs = unit * NSEC_PER_SEC; in nft_limit_init() 66 if (limit->rate == 0 || limit->nsecs < unit) in nft_limit_init() 79 tokens = div64_u64(limit->nsecs, limit->rate) * limit->burst; in nft_limit_init() 85 tokens = div64_u64(limit->nsecs * (limit->rate + limit->burst), in nft_limit_init() 108 u64 secs = div_u64(limit->nsecs, NSEC_PER_SEC); in nft_limit_dump() 158 priv->cost = div64_u64(priv->limit.nsecs, priv->limit.rate); in nft_limit_pkts_init() 183 u64 cost = div64_u64(priv->nsecs * pkt->skb->len, priv->rate); in nft_limit_bytes_eval() 260 priv->cost = div64_u64(priv->limit.nsecs, priv->limit.rate); in nft_limit_obj_pkts_init() 287 u64 cost = div64_u64(priv->nsecs * pkt->skb->len, priv->rate); in nft_limit_obj_bytes_eval()
|
/linux/tools/perf/scripts/python/ |
A D | netdev-times.py | 235 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec) 241 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec) 252 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, 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, 292 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, 297 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, [all …]
|
A D | compaction-times.py | 96 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)
|
A D | powerpc-hcalls.py | 176 diff = nsecs(sec, nsec) - d_enter[cpu][opcode] 200 d_enter[cpu][opcode] = nsecs(sec, nsec) 202 d_enter[cpu] = {opcode: nsecs(sec, nsec)}
|
/linux/arch/um/include/asm/ |
A D | delay.h | 7 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/ |
A D | udelay.c | 51 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/Documentation/ |
A D | perf-script-perl.txt | 99 $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/arch/arm/plat-omap/ |
A D | counter_32k.c | 56 unsigned long long nsecs; in omap_read_persistent_clock64() local 62 nsecs = clocksource_cyc2ns(cycles - last_cycles, in omap_read_persistent_clock64() 65 timespec64_add_ns(&persistent_ts, nsecs); in omap_read_persistent_clock64()
|
/linux/block/ |
A D | genhd.c | 135 stat->nsecs[group] += ptr->nsecs[group]; in part_stat_read_all() 943 (unsigned int)div_u64(stat.nsecs[STAT_READ] + in part_stat_show() 944 stat.nsecs[STAT_WRITE] + in part_stat_show() 945 stat.nsecs[STAT_DISCARD] + in part_stat_show() 946 stat.nsecs[STAT_FLUSH], in part_stat_show() 1198 (unsigned int)div_u64(stat.nsecs[STAT_READ], in diskstats_show() 1203 (unsigned int)div_u64(stat.nsecs[STAT_WRITE], in diskstats_show() 1207 (unsigned int)div_u64(stat.nsecs[STAT_READ] + in diskstats_show() 1208 stat.nsecs[STAT_WRITE] + in diskstats_show() 1209 stat.nsecs[STAT_DISCARD] + in diskstats_show() [all …]
|
/linux/kernel/time/ |
A D | timekeeping.c | 800 u64 nsecs; in ktime_get_real_ts64() local 813 timespec64_add_ns(ts, nsecs); in ktime_get_real_ts64() 822 u64 nsecs; in ktime_get() local 841 u32 nsecs; in ktime_get_resolution_ns() local 850 return nsecs; in ktime_get_resolution_ns() 865 u64 nsecs; in ktime_get_with_offset() local 886 u64 nsecs; in ktime_get_coarse_with_offset() local 929 u64 nsecs; in ktime_get_raw() local 1500 u64 nsecs; in ktime_get_raw_ts64() local 1510 timespec64_add_ns(ts, nsecs); in ktime_get_raw_ts64() [all …]
|
/linux/arch/sh/lib/ |
A D | delay.c | 50 void __ndelay(unsigned long nsecs) in __ndelay() argument 52 __const_udelay(nsecs * 0x00000005); in __ndelay()
|
/linux/arch/csky/lib/ |
A D | delay.c | 35 void __ndelay(unsigned long nsecs) in __ndelay() argument 37 __const_udelay(nsecs * 0x5UL); /* 2**32 / 1000000000 (rounded up) */ in __ndelay()
|
/linux/arch/x86/um/ |
A D | delay.c | 53 void __ndelay(unsigned long nsecs) in __ndelay() argument 55 __const_udelay(nsecs * 0x00005); /* 2**32 / 1000000000 (rounded up) */ in __ndelay()
|
/linux/arch/h8300/lib/ |
A D | delay.c | 37 void __ndelay(unsigned long nsecs) in __ndelay() argument 39 __const_udelay(nsecs * 0x5UL); /* 2**32 / 1000000000 (rounded up) */ in __ndelay()
|