HomeFreeBSD

dwwdt: make it actually useful

Description

dwwdt: make it actually useful

Flip dwwdt_prevent_restart to false. What's the use of a watchdog if it
does not restart a hung system?

Add a knob for panic-ing on the first timeout, resetting on the second
one. This can be useful if interrupts can still work, otherwise a reset
recovers a system without any aid for debugging the hang.

The change also doubles the timeout that's programmed into the hardware.
The previous version of the code always had the interrupt on the first
timeout enabled, but it took no action on it. Only the second timeout
could be configured to reset the system. So, the hardware timeout was
set to a half of the user requested timeout. But now,we can take a
corrective action on the first timeout, so we use the user requested
timeout.

While here, define boolean sysctl-s as such.

(cherry picked from commit ee900888c42f12f7ccf73e5a320446da4661a0e9)

Details

Provenance
avgAuthored on Jan 11 2022, 1:56 PM
Parents
rGec2db06d0db2: stdio: add test for 86a16ada1ea608408cec370: fflush() handling of errors
Branches
Unknown
Tags
Unknown