Lines Matching refs:offset_ns
67 static s64 tdc_offset2phase(struct idtfc3 *idtfc3, s64 offset_ns)
69 if (offset_ns > idtfc3->ns_per_sync / 2)
70 offset_ns -= idtfc3->ns_per_sync;
72 return offset_ns * idtfc3->tdc_offset_sign;
205 static bool get_tdc_meas(struct idtfc3 *idtfc3, s64 *offset_ns)
230 *offset_ns = tdc_meas2offset(idtfc3, get_unaligned_le64(&buf[1]));
260 s64 offset_ns;
267 if (get_tdc_meas(idtfc3, &offset_ns) && offset_ns >= 0) {
269 event.offset = tdc_offset2phase(idtfc3, offset_ns);
387 s64 offset_ns, now_ns;
400 offset_ns = (idtfc3->sub_sync_count - now) * idtfc3->ns_per_counter;
402 (void)ns2counters(idtfc3, offset_ns + now_ns, &sub_ns);