diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-12-17 09:26:37 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-12-17 09:26:37 +0000 |
commit | 35bc9b9252b7bd4beb9847d2808a45dba266ec99 (patch) | |
tree | 11496e4222ffcff042fd00cd49e0c6c1185a9c3e | |
parent | 4acc8923abc902bd69178f7ab9e85c2d7a808a0e (diff) |
Use config_mountroot(9) instead of startuphook_establish(9).
Fix a regression reported by Ian Mcwilliam on tech@
-rw-r--r-- | sys/dev/pv/vmt.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sys/dev/pv/vmt.c b/sys/dev/pv/vmt.c index da383ae185e..4333439bf92 100644 --- a/sys/dev/pv/vmt.c +++ b/sys/dev/pv/vmt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmt.c,v 1.6 2015/12/11 16:07:01 mpi Exp $ */ +/* $OpenBSD: vmt.c,v 1.7 2015/12/17 09:26:36 mpi Exp $ */ /* * Copyright (c) 2007 David Crawshaw <david@zentus.com> @@ -208,6 +208,7 @@ void vmt_shutdown(void *); void vmt_update_guest_info(struct vmt_softc *); void vmt_update_guest_uptime(struct vmt_softc *); +void vmt_tick_hook(struct device *self); void vmt_tick(void *); void vmt_resume(void); @@ -364,9 +365,7 @@ vmt_attach(struct device *parent, struct device *self, void *aux) sensor_attach(&sc->sc_sensordev, &sc->sc_sensor); sensordev_install(&sc->sc_sensordev); - timeout_set(&sc->sc_tick, vmt_tick, sc); - if (startuphook_establish(vmt_tick, sc) == NULL) - DPRINTF("%s: unable to establish tick\n", DEVNAME(sc)); + config_mountroot(self, vmt_tick_hook); timeout_set(&sc->sc_tclo_tick, vmt_tclo_tick, sc); timeout_add_sec(&sc->sc_tclo_tick, 1); @@ -470,6 +469,15 @@ vmt_update_guest_info(struct vmt_softc *sc) } void +vmt_tick_hook(struct device *self) +{ + struct vmt_softc *sc = (struct vmt_softc *)self; + + timeout_set(&sc->sc_tick, vmt_tick, sc); + vmt_tick(sc); +} + +void vmt_tick(void *xarg) { struct vmt_softc *sc = xarg; |