linux/Documentation/watchdog
Rasmus Villemoes 4d1c6a0ec2 watchdog: introduce watchdog.open_timeout commandline parameter
The watchdog framework takes care of feeding a hardware watchdog until
userspace opens /dev/watchdogN. If that never happens for some reason
(buggy init script, corrupt root filesystem or whatnot) but the kernel
itself is fine, the machine stays up indefinitely. This patch allows
setting an upper limit for how long the kernel will take care of the
watchdog, thus ensuring that the watchdog will eventually reset the
machine.

A value of 0 (the default) means infinite timeout, preserving the
current behaviour.

This is particularly useful for embedded devices where some fallback
logic is implemented in the bootloader (e.g., use a different root
partition, boot from network, ...).

There is already handle_boot_enabled serving a similar purpose. However,
such a binary choice is unsuitable if the hardware watchdog cannot be
programmed by the bootloader to provide a timeout long enough for
userspace to get up and running. Many of the embedded devices we see use
external (gpio-triggered) watchdogs with a fixed timeout of the order of
1-2 seconds.

The open timeout only applies for the first open from
userspace. Should userspace need to close the watchdog device, with
the intention of re-opening it shortly, the application can emulate
the open timeout feature by combining the nowayout feature with an
appropriate WDIOC_SETTIMEOUT immediately prior to closing the device.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
2019-07-08 20:04:13 +02:00
..
convert_drivers_to_kernel_api.txt docs: fix locations of several documents that got moved 2016-10-24 08:12:35 -02:00
hpwdt.txt watchdog/hpwdt: Update documentation 2019-07-08 16:10:09 +02:00
mlx-wdt.txt Documentation/watchdog: Add documentation mlx-wdt driver 2019-03-02 15:28:20 +01:00
pcwd-watchdog.txt Documentation: fix selftests related file refs 2017-10-19 12:58:21 -06:00
watchdog-api.txt samples: move watchdog example code from Documentation 2016-09-23 11:52:14 -06:00
watchdog-kernel-api.txt watchdog: docs: kernel-api: don't reference removed functions 2018-12-24 13:15:06 +01:00
watchdog-parameters.txt watchdog: introduce watchdog.open_timeout commandline parameter 2019-07-08 20:04:13 +02:00
watchdog-pm.txt watchdog: add documentation for PM usage 2018-12-24 13:15:06 +01:00
wdt.txt samples: move watchdog example code from Documentation 2016-09-23 11:52:14 -06:00