Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/kern_et.c
Show All 31 Lines | |||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/sbuf.h> | #include <sys/sbuf.h> | ||||
#include <sys/sysctl.h> | #include <sys/sysctl.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/queue.h> | #include <sys/queue.h> | ||||
#include <sys/timeet.h> | #include <sys/timeet.h> | ||||
#include "opt_timer.h" | |||||
SLIST_HEAD(et_eventtimers_list, eventtimer); | SLIST_HEAD(et_eventtimers_list, eventtimer); | ||||
static struct et_eventtimers_list eventtimers = SLIST_HEAD_INITIALIZER(et_eventtimers); | static struct et_eventtimers_list eventtimers = SLIST_HEAD_INITIALIZER(et_eventtimers); | ||||
struct mtx et_eventtimers_mtx; | struct mtx et_eventtimers_mtx; | ||||
MTX_SYSINIT(et_eventtimers_init, &et_eventtimers_mtx, "et_mtx", MTX_DEF); | MTX_SYSINIT(et_eventtimers_init, &et_eventtimers_mtx, "et_mtx", MTX_DEF); | ||||
SYSCTL_NODE(_kern, OID_AUTO, eventtimer, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, | SYSCTL_NODE(_kern, OID_AUTO, eventtimer, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, | ||||
"Event timers"); | "Event timers"); | ||||
▲ Show 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | |||||
* Change the frequency of the given timer. If it is the active timer, | * Change the frequency of the given timer. If it is the active timer, | ||||
* reconfigure it on all CPUs (reschedules all current events based on the new | * reconfigure it on all CPUs (reschedules all current events based on the new | ||||
* timer frequency). | * timer frequency). | ||||
*/ | */ | ||||
void | void | ||||
et_change_frequency(struct eventtimer *et, uint64_t newfreq) | et_change_frequency(struct eventtimer *et, uint64_t newfreq) | ||||
{ | { | ||||
#ifndef NO_EVENTTIMERS | |||||
cpu_et_frequency(et, newfreq); | cpu_et_frequency(et, newfreq); | ||||
#endif | |||||
} | } | ||||
/* | /* | ||||
* Find free event timer hardware with specified parameters. | * Find free event timer hardware with specified parameters. | ||||
*/ | */ | ||||
struct eventtimer * | struct eventtimer * | ||||
et_find(const char *name, int check, int want) | et_find(const char *name, int check, int want) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 127 Lines • Show Last 20 Lines |