Changeset View
Changeset View
Standalone View
Standalone View
sys/mips/nlm/tick.c
Show First 20 Lines • Show All 173 Lines • ▼ Show 20 Lines | sysctl_machdep_counter_freq(SYSCTL_HANDLER_ARGS) | ||||
if (error == 0 && req->newptr != NULL) { | if (error == 0 && req->newptr != NULL) { | ||||
counter_freq = freq; | counter_freq = freq; | ||||
softc->et.et_frequency = counter_freq; | softc->et.et_frequency = counter_freq; | ||||
softc->tc.tc_frequency = counter_freq; | softc->tc.tc_frequency = counter_freq; | ||||
} | } | ||||
return (error); | return (error); | ||||
} | } | ||||
SYSCTL_PROC(_machdep, OID_AUTO, counter_freq, CTLTYPE_U64 | CTLFLAG_RW, | SYSCTL_PROC(_machdep, OID_AUTO, counter_freq, | ||||
CTLTYPE_U64 | CTLFLAG_RW | CTLFLAG_NEEDGIANT, | |||||
NULL, 0, sysctl_machdep_counter_freq, "QU", | NULL, 0, sysctl_machdep_counter_freq, "QU", | ||||
"Timecounter frequency in Hz"); | "Timecounter frequency in Hz"); | ||||
static unsigned | static unsigned | ||||
counter_get_timecount(struct timecounter *tc) | counter_get_timecount(struct timecounter *tc) | ||||
{ | { | ||||
return (mips_rd_count()); | return (mips_rd_count()); | ||||
▲ Show 20 Lines • Show All 197 Lines • Show Last 20 Lines |