Changeset View
Changeset View
Standalone View
Standalone View
sys/x86/x86/tsc.c
Show First 20 Lines • Show All 739 Lines • ▼ Show 20 Lines | if (tsc_freq != 0) { | ||||
tsc_timecounter.tc_priv = (void *)(intptr_t)shift; | tsc_timecounter.tc_priv = (void *)(intptr_t)shift; | ||||
/* | /* | ||||
* Timecounter registration is deferred until after late | * Timecounter registration is deferred until after late | ||||
* calibration is finished. | * calibration is finished. | ||||
*/ | */ | ||||
} | } | ||||
} | } | ||||
SYSINIT(tsc_tc, SI_SUB_SMP, SI_ORDER_ANY, init_TSC_tc, NULL); | SYSINIT(tsc_tc, SI_SUB_SMP, SI_ORDER_ANY, init_TSC_tc); | ||||
static void | static void | ||||
tsc_update_freq(uint64_t new_freq) | tsc_update_freq(uint64_t new_freq) | ||||
{ | { | ||||
atomic_store_rel_64(&tsc_freq, new_freq); | atomic_store_rel_64(&tsc_freq, new_freq); | ||||
atomic_store_rel_64(&tsc_timecounter.tc_frequency, | atomic_store_rel_64(&tsc_timecounter.tc_frequency, | ||||
new_freq >> (int)(intptr_t)tsc_timecounter.tc_priv); | new_freq >> (int)(intptr_t)tsc_timecounter.tc_priv); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 242 Lines • Show Last 20 Lines |