Simple reduction here as done in many other places, tested on an ARMv7 BeagleBone Black with
omdog0 at simplebus0 rev 0.1 # sysctl kern.watchdog.period=3 # sysctl kern.watchdog.auto=0 which reliably reboots the system after the specified amount of time. OK? Index: kern/kern_watchdog.c =================================================================== RCS file: /cvs/src/sys/kern/kern_watchdog.c,v retrieving revision 1.13 diff -u -p -r1.13 kern_watchdog.c --- kern/kern_watchdog.c 9 Jan 2017 17:58:44 -0000 1.13 +++ kern/kern_watchdog.c 15 Jun 2019 23:42:24 -0000 @@ -54,7 +54,7 @@ wdog_tickle(void *arg) if (wdog_ctl_cb == NULL) return; (void) (*wdog_ctl_cb)(wdog_ctl_cb_arg, wdog_period); - timeout_add(&wdog_timeout, wdog_period * hz / 2); + timeout_add_sec(&wdog_timeout, wdog_period / 2); } void @@ -100,7 +100,7 @@ sysctl_wdog(int *name, u_int namelen, vo if (wdog_auto && wdog_period > 0) { (void) (*wdog_ctl_cb)(wdog_ctl_cb_arg, wdog_period); - timeout_add(&wdog_timeout, wdog_period * hz / 2); + timeout_add_sec(&wdog_timeout, wdog_period / 2); } else timeout_del(&wdog_timeout);