summaryrefslogtreecommitdiff
path: root/sys/dev/pv/hyperv.c
diff options
context:
space:
mode:
authorcheloha <cheloha@cvs.openbsd.org>2021-02-23 04:44:32 +0000
committercheloha <cheloha@cvs.openbsd.org>2021-02-23 04:44:32 +0000
commit3a7b91837ea37fe0a67697b9e86aa5d7b4c59e46 (patch)
tree4b77aa3e50ca4aef39f9ebc139c7eff8e9b889ca /sys/dev/pv/hyperv.c
parentfc8936f7e4477d854a50d90188b2f90cd0b9e87f (diff)
timecounting: use C99-style initialization for all timecounter structs
The timecounter struct is large and I think it may change in the future. Changing it later will be easier if we use C99-style initialization for all timecounter structs. It also makes reading the code a bit easier. For reasons I cannot explain, switching to C99-style initialization sometimes changes the hash of the resulting object file, even though the resulting struct should be the same. So there is a binary change here, but only sometimes. No behavior should change in either case. I can't compile-test this everywhere but I have been staring at the diff for days now and I'm relatively confident this will not break compilation. Fingers crossed. ok gnezdo@
Diffstat (limited to 'sys/dev/pv/hyperv.c')
-rw-r--r--sys/dev/pv/hyperv.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/pv/hyperv.c b/sys/dev/pv/hyperv.c
index 4a695cc4517..de753ccbfc9 100644
--- a/sys/dev/pv/hyperv.c
+++ b/sys/dev/pv/hyperv.c
@@ -141,7 +141,14 @@ struct {
};
struct timecounter hv_timecounter = {
- hv_gettime, 0, 0xffffffff, 10000000, "hyperv", 9001, NULL, 0
+ .tc_get_timecount = hv_gettime,
+ .tc_poll_pps = 0,
+ .tc_counter_mask = 0xffffffff,
+ .tc_frequency = 10000000,
+ .tc_name = "hyperv",
+ .tc_quality = 9001,
+ .tc_priv = NULL,
+ .tc_user = 0,
};
struct cfdriver hyperv_cd = {