Lines Matching +full:max +full:- +full:counts
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.
38 * struct timecounter - layer above a %struct cyclecounter which counts nanoseconds
41 * timecounter_init(). Also used to convert cycle counts into the
42 * corresponding nanosecond counts with timecounter_cyc2time(). Users
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.
86 tc->nsec += delta; in timecounter_adjtime()
90 * timecounter_init - initialize a time counter
104 * timecounter_read - return nanoseconds elapsed since timecounter_init()
114 * timecounter_cyc2time - convert a cycle counter to same
118 * @cycle_tstamp: a value returned by tc->cc->read()
120 * Cycle counts that are converted correctly as long as they
121 * fall into the interval [-1/2 max cycle count, +1/2 max cycle count],
122 * with "max cycle count" == cs->mask+1.