Changeset View
Changeset View
Standalone View
Standalone View
sys/i386/i386/mp_clock.c
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | sysctl_machdep_piix_freq(SYSCTL_HANDLER_ARGS) | ||||
error = sysctl_handle_int(oidp, &freq, 0, req); | error = sysctl_handle_int(oidp, &freq, 0, req); | ||||
if (error == 0 && req->newptr != NULL) { | if (error == 0 && req->newptr != NULL) { | ||||
piix_freq = freq; | piix_freq = freq; | ||||
piix_timecounter.tc_frequency = piix_freq; | piix_timecounter.tc_frequency = piix_freq; | ||||
} | } | ||||
return (error); | return (error); | ||||
} | } | ||||
SYSCTL_PROC(_machdep, OID_AUTO, piix_freq, CTLTYPE_INT | CTLFLAG_RW, | SYSCTL_PROC(_machdep, OID_AUTO, piix_freq, | ||||
0, sizeof(u_int), sysctl_machdep_piix_freq, "I", ""); | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, | ||||
0, sizeof(u_int), sysctl_machdep_piix_freq, "I", | |||||
""); | |||||
static unsigned | static unsigned | ||||
piix_get_timecount(struct timecounter *tc) | piix_get_timecount(struct timecounter *tc) | ||||
{ | { | ||||
unsigned u1, u2, u3; | unsigned u1, u2, u3; | ||||
u2 = inl(piix_timecounter_address); | u2 = inl(piix_timecounter_address); | ||||
u3 = inl(piix_timecounter_address); | u3 = inl(piix_timecounter_address); | ||||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |