Page MenuHomeFreeBSD

watchdog: Convert to using sbintime_t format
Needs ReviewPublic

Authored by jhibbits on Oct 28 2024, 3:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 4, 8:19 AM
Unknown Object (File)
Fri, Nov 29, 10:06 PM
Unknown Object (File)
Sun, Nov 24, 4:38 PM
Unknown Object (File)
Thu, Nov 21, 11:07 PM
Unknown Object (File)
Thu, Nov 14, 4:18 PM
Unknown Object (File)
Fri, Nov 8, 8:32 AM
Unknown Object (File)
Thu, Nov 7, 8:04 PM
Unknown Object (File)
Nov 2 2024, 2:12 AM
Subscribers

Details

Reviewers
phk
imp
jhb
stevek
Summary

Some watchdogs are now based on a countdown timer instead of a bit
check. To deal with these, convert the watchdog framework to use
sbintime_t instead of power-of-2-nanoseconds. This allows more
precision, and more variety of watchdog timeouts. Keep the old method
as a compatibility layer, so that drivers can be migrated slowly, as
needed.

Still TODO: documentation updates, probably a lot of cleanup, too.

Test Plan

This was tested in a VM with SW_WATCHDOG configured, and various debug printf()s added, which I'll commit later.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 60222
Build 57106: arc lint + arc unit

Event Timeline

jhibbits created this revision.

As the original author of the watchdog interfaces, I have no objections to this change, but I have not reviewed the diff.

adrian added inline comments.
sys/sys/watchdog.h
45

is it ok for these to re-use the same ioctl numbers as the existing API?

sys/sys/watchdog.h
45

I believe so, because the type is also encoded into the final ioctl number. At least, there's no build errors, and the right cases are used when tested :)