Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/hyperv/vmbus/hv_et.c
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | |||||
static int | static int | ||||
hv_et_start(struct eventtimer *et, sbintime_t firsttime, sbintime_t periodtime) | hv_et_start(struct eventtimer *et, sbintime_t firsttime, sbintime_t periodtime) | ||||
{ | { | ||||
union hv_timer_config timer_cfg; | union hv_timer_config timer_cfg; | ||||
uint64_t current; | uint64_t current; | ||||
timer_cfg.as_uint64 = 0; | timer_cfg.as_uint64 = 0; | ||||
timer_cfg.auto_enable = 1; | timer_cfg.auto_enable = 1; | ||||
timer_cfg.sintx = HV_VMBUS_MESSAGE_SINT; | timer_cfg.sintx = HV_VMBUS_TIMER_SINT; | ||||
periodticks[curcpu] = sbintime2tick(periodtime); | periodticks[curcpu] = sbintime2tick(periodtime); | ||||
if (firsttime == 0) | if (firsttime == 0) | ||||
firsttime = periodtime; | firsttime = periodtime; | ||||
current = rdmsr(HV_X64_MSR_TIME_REF_COUNT); | current = rdmsr(HV_X64_MSR_TIME_REF_COUNT); | ||||
current += sbintime2tick(firsttime); | current += sbintime2tick(firsttime); | ||||
▲ Show 20 Lines • Show All 60 Lines • Show Last 20 Lines |