- now = src_now & 0xFFFFFFFF00000000ULL;
- now |= (u64) last;
- /* Detect overflow or underflow between now and last. */
- if ((src_now & 0x80000000U) && !(last & 0x80000000U)) {
- /*
- * If 32nd bit transitions from 1 to 0, and we move forward in
- * time from "now" to "last", then we have an overflow.
- */
- if (((s32) now - (s32) last) < 0)
- now += 0x0000000100000000ULL;
- } else if (!(src_now & 0x80000000U) && (last & 0x80000000U)) {
- /*
- * If 32nd bit transitions from 0 to 1, and we move backward in
- * time from "now" to "last", then we have an underflow.
- */
- if (((s32) now - (s32) last) > 0)
- now -= 0x0000000100000000ULL;
- }
- return now;
-}
-#else /* #if (BITS_PER_LONG == 32) */
-/*
- * The fixup is pretty easy on 64-bit architectures: "last" is a 64-bit
- * value, so we can use last directly as current time.
- */
-static inline u64 trace_clock_fixup(u64 src_now, u64 last)
-{
- return last;
-}
-#endif /* #else #if (BITS_PER_LONG == 32) */