Lines Matching full:cc
9 const struct cyclecounter *cc, in timecounter_init() argument
12 tc->cc = cc; in timecounter_init()
13 tc->cycle_last = cc->read(cc); in timecounter_init()
15 tc->mask = (1ULL << cc->shift) - 1; in timecounter_init()
37 cycle_now = tc->cc->read(tc->cc); in timecounter_read_delta()
40 cycle_delta = (cycle_now - tc->cycle_last) & tc->cc->mask; in timecounter_read_delta()
43 ns_offset = cyclecounter_cyc2ns(tc->cc, cycle_delta, in timecounter_read_delta()
69 static u64 cc_cyc2ns_backwards(const struct cyclecounter *cc, in cc_cyc2ns_backwards() argument
74 ns = ((ns * cc->mult) - frac) >> cc->shift; in cc_cyc2ns_backwards()
82 u64 delta = (cycle_tstamp - tc->cycle_last) & tc->cc->mask; in timecounter_cyc2time()
90 if (delta > tc->cc->mask / 2) { in timecounter_cyc2time()
91 delta = (tc->cycle_last - cycle_tstamp) & tc->cc->mask; in timecounter_cyc2time()
92 nsec -= cc_cyc2ns_backwards(tc->cc, delta, tc->mask, frac); in timecounter_cyc2time()
94 nsec += cyclecounter_cyc2ns(tc->cc, delta, tc->mask, &frac); in timecounter_cyc2time()