Page MenuHomeFreeBSD

watchdog: Convert to using sbintime_t format
ClosedPublic

Authored by jhibbits on Feb 28 2025, 6:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 6, 2:16 PM
Unknown Object (File)
Fri, Nov 28, 2:28 PM
Unknown Object (File)
Thu, Nov 27, 5:36 PM
Unknown Object (File)
Tue, Nov 25, 9:39 PM
Unknown Object (File)
Mon, Nov 24, 3:24 AM
Unknown Object (File)
Nov 12 2025, 10:37 PM
Unknown Object (File)
Nov 10 2025, 11:39 PM
Unknown Object (File)
Nov 4 2025, 9:35 PM
Subscribers

Details

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.

Diff Detail

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

Event Timeline

sys/dev/watchdog/watchdog.c
198

Spurious line?

390

Hmm, you could just let these all fall through to the default case for now. Even if you want explicit case statements maybe just use:

case WDIOC_GETTIMEOUT:
case WDIOC_GETTIMELEFT:
...
default:
           error = ENIOCTL;

This looks ok to me.

This revision is now accepted and ready to land.Aug 14 2025, 5:07 PM