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.
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
75 ns = (ns * cc->mult) + *frac; in cyclecounter_cyc2ns()
77 return ns >> cc->shift; in cyclecounter_cyc2ns()
81 * timecounter_adjtime - Shifts the time of the clock.
82 * @delta: Desired change in nanoseconds.
86 tc->nsec += delta; in timecounter_adjtime()
90 * timecounter_init - initialize a time counter
104 * timecounter_read - return nanoseconds elapsed since timecounter_init()
108 * In other words, keeps track of time since the same epoch as
114 * timecounter_cyc2time - convert a cycle counter to same
118 * @cycle_tstamp: a value returned by tc->cc->read()
121 * fall into the interval [-1/2 max cycle count, +1/2 max cycle count],
122 * with "max cycle count" == cs->mask+1.
125 * in the past.