Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147300640
D6598.id16974.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D6598.id16974.diff
View Options
Index: sys/dev/hyperv/vmbus/hv_et.c
===================================================================
--- sys/dev/hyperv/vmbus/hv_et.c
+++ sys/dev/hyperv/vmbus/hv_et.c
@@ -41,6 +41,8 @@
#include <dev/hyperv/vmbus/hyperv_var.h>
#include <dev/hyperv/vmbus/vmbus_var.h>
+#define VMBUS_ET_NAME "hvet"
+
#define MSR_HV_STIMER0_CFG_SINT \
((((uint64_t)VMBUS_SINT_TIMER) << MSR_HV_STIMER_CFG_SINT_SHIFT) & \
MSR_HV_STIMER_CFG_SINT_MASK)
@@ -58,7 +60,7 @@
static struct eventtimer vmbus_et;
static __inline uint64_t
-sbintime2tick(sbintime_t time)
+hyperv_sbintime2count(sbintime_t time)
{
struct timespec val;
@@ -68,12 +70,13 @@
}
static int
-hv_et_start(struct eventtimer *et, sbintime_t firsttime, sbintime_t periodtime)
+vmbus_et_start(struct eventtimer *et __unused, sbintime_t first,
+ sbintime_t period __unused)
{
uint64_t current;
current = rdmsr(MSR_HV_TIME_REF_COUNT);
- current += sbintime2tick(firsttime);
+ current += hyperv_sbintime2count(first);
wrmsr(MSR_HV_STIMER0_COUNT, current);
return (0);
@@ -97,18 +100,18 @@
}
static void
-hv_et_identify(driver_t *driver, device_t parent)
+vmbus_et_identify(driver_t *driver, device_t parent)
{
if (device_get_unit(parent) != 0 ||
- device_find_child(parent, "hv_et", -1) != NULL ||
+ device_find_child(parent, VMBUS_ET_NAME, -1) != NULL ||
(hyperv_features & CPUID_HV_ET_MASK) != CPUID_HV_ET_MASK)
return;
- device_add_child(parent, "hv_et", -1);
+ device_add_child(parent, VMBUS_ET_NAME, -1);
}
static int
-hv_et_probe(device_t dev)
+vmbus_et_probe(device_t dev)
{
device_set_desc(dev, "Hyper-V event timer");
@@ -141,7 +144,7 @@
}
static int
-hv_et_attach(device_t dev)
+vmbus_et_attach(device_t dev)
{
/* TODO: use independent IDT vector */
@@ -151,7 +154,7 @@
vmbus_et.et_frequency = HYPERV_TIMER_FREQ;
vmbus_et.et_min_period = (0x00000001ULL << 32) / HYPERV_TIMER_FREQ;
vmbus_et.et_max_period = (0xfffffffeULL << 32) / HYPERV_TIMER_FREQ;
- vmbus_et.et_start = hv_et_start;
+ vmbus_et.et_start = vmbus_et_start;
/*
* Delay a bit to make sure that MSR_HV_TIME_REF_COUNT will
@@ -165,26 +168,26 @@
}
static int
-hv_et_detach(device_t dev)
+vmbus_et_detach(device_t dev)
{
return (et_deregister(&vmbus_et));
}
-static device_method_t hv_et_methods[] = {
- DEVMETHOD(device_identify, hv_et_identify),
- DEVMETHOD(device_probe, hv_et_probe),
- DEVMETHOD(device_attach, hv_et_attach),
- DEVMETHOD(device_detach, hv_et_detach),
+static device_method_t vmbus_et_methods[] = {
+ DEVMETHOD(device_identify, vmbus_et_identify),
+ DEVMETHOD(device_probe, vmbus_et_probe),
+ DEVMETHOD(device_attach, vmbus_et_attach),
+ DEVMETHOD(device_detach, vmbus_et_detach),
DEVMETHOD_END
};
-static driver_t hv_et_driver = {
- "hv_et",
- hv_et_methods,
+static driver_t vmbus_et_driver = {
+ VMBUS_ET_NAME,
+ vmbus_et_methods,
0
};
-static devclass_t hv_et_devclass;
-DRIVER_MODULE(hv_et, vmbus, hv_et_driver, hv_et_devclass, NULL, 0);
+static devclass_t vmbus_et_devclass;
+DRIVER_MODULE(hv_et, vmbus, vmbus_et_driver, vmbus_et_devclass, NULL, NULL);
MODULE_VERSION(hv_et, 1);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 10, 7:18 PM (6 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29507816
Default Alt Text
D6598.id16974.diff (3 KB)
Attached To
Mode
D6598: hyperv/et: Device renaming; consistent w/ other Hyper-V utils
Attached
Detach File
Event Timeline
Log In to Comment