Changeset View
Changeset View
Standalone View
Standalone View
sys/x86/isa/clock.c
Show First 20 Lines • Show All 407 Lines • ▼ Show 20 Lines | |||||
cpu_initclocks(void) | cpu_initclocks(void) | ||||
{ | { | ||||
#ifdef EARLY_AP_STARTUP | #ifdef EARLY_AP_STARTUP | ||||
struct thread *td; | struct thread *td; | ||||
int i; | int i; | ||||
td = curthread; | td = curthread; | ||||
tsc_calibrate(); | |||||
lapic_calibrate_timer(); | lapic_calibrate_timer(); | ||||
cpu_initclocks_bsp(); | cpu_initclocks_bsp(); | ||||
CPU_FOREACH(i) { | CPU_FOREACH(i) { | ||||
if (i == 0) | if (i == 0) | ||||
continue; | continue; | ||||
thread_lock(td); | thread_lock(td); | ||||
sched_bind(td, i); | sched_bind(td, i); | ||||
thread_unlock(td); | thread_unlock(td); | ||||
cpu_initclocks_ap(); | cpu_initclocks_ap(); | ||||
} | } | ||||
thread_lock(td); | thread_lock(td); | ||||
if (sched_is_bound(td)) | if (sched_is_bound(td)) | ||||
sched_unbind(td); | sched_unbind(td); | ||||
thread_unlock(td); | thread_unlock(td); | ||||
#else | #else | ||||
tsc_calibrate(); | |||||
lapic_calibrate_timer(); | lapic_calibrate_timer(); | ||||
cpu_initclocks_bsp(); | cpu_initclocks_bsp(); | ||||
#endif | #endif | ||||
} | } | ||||
static int | static int | ||||
sysctl_machdep_i8254_freq(SYSCTL_HANDLER_ARGS) | sysctl_machdep_i8254_freq(SYSCTL_HANDLER_ARGS) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 219 Lines • Show Last 20 Lines |