Lines Matching +full:in +full:- +full:and +full:- +full:around
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
14 #define CYCLECOUNTER_MASK(bits) (u64)((bits) < 64 ? ((1ULL<<(bits))-1) : -1)
17 * struct cyclecounter - hardware abstraction for a free running counter
18 * Provides completely state-free accessors to the underlying hardware.
20 * around quickly. Locking rules (if necessary) have to be defined
21 * by the implementor and user of specific instances of this API.
25 * subtraction of non-64-bit counters,
38 * struct timecounter - layer above a &struct cyclecounter which counts nanoseconds
40 * cycle counter wrap around. Initialize with
44 * cycle counter hardware, locking issues and reading the time
45 * more often than the cycle counter wraps around. The nanosecond
46 * counter will only wrap around after ~585 years.
64 * cyclecounter_cyc2ns - converts cycle counter cycles to nanoseconds
77 ns = (ns * cc->mult) + *frac; in cyclecounter_cyc2ns()
79 return ns >> cc->shift; in cyclecounter_cyc2ns()
83 * timecounter_adjtime - Shifts the time of the clock.
85 * @delta: Desired change in nanoseconds.
89 tc->nsec += delta; in timecounter_adjtime()
93 * timecounter_init - initialize a time counter
107 * timecounter_read - return nanoseconds elapsed since timecounter_init()
111 * In other words, keeps track of time since the same epoch as
119 * timecounter_cyc2time - convert a cycle counter to same
123 * @cycle_tstamp: a value returned by tc->cc->read()
126 * fall into the interval [-1/2 max cycle count, +1/2 max cycle count],
127 * with "max cycle count" == cs->mask+1.
130 * in the past.