6 #if CONFIG(TSC_SYNC_MFENCE)
7 #define TSC_SYNC "mfence\n"
8 #elif CONFIG(TSC_SYNC_LFENCE)
9 #define TSC_SYNC "lfence\n"
26 :
"=a" (res.
lo),
"=d"(res.
hi)
36 tsc->
lo = (a & 0xffff) * (b & 0xffff);
37 tsc->
hi = ((tsc->
lo >> 16)
38 + ((a & 0xffff) * (b >> 16))
39 + ((b & 0xffff) * (a >> 16)));
40 tsc->
lo = ((tsc->
hi & 0xffff) << 16) | (tsc->
lo & 0xffff);
41 tsc->
hi = ((a >> 16) * (b >> 16)) + (tsc->
hi >> 16);
49 static inline unsigned long long rdtscll(
void)
59 return !
CONFIG(UNKNOWN_TSC_RATE);
unsigned long long uint64_t
unsigned long tsc_freq_mhz(void)
static void multiply_to_tsc(tsc_t *const tsc, const u32 a, const u32 b)
static int tsc_constant_rate(void)
static uint64_t tsc_to_uint64(tsc_t tstamp)
static unsigned long long rdtscll(void)