summaryrefslogtreecommitdiff
path: root/Documentation/watchdog/mlx-wdt.txt
diff options
context:
space:
mode:
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>2019-06-05 17:06:44 +0300
committerWim Van Sebroeck <wim@linux-watchdog.org>2019-07-08 21:04:13 +0300
commitc2eac35bc2717abd585a3eede879d75461685bc7 (patch)
tree0d32bb1fcbc4c1d75cce0aca659ffea2ff169119 /Documentation/watchdog/mlx-wdt.txt
parent487e4e08221debb1ccf9cb2c249fac379b74cbb2 (diff)
downloadlinux-c2eac35bc2717abd585a3eede879d75461685bc7.tar.xz
watchdog: make the device time out at open_deadline when open_timeout is used
When the watchdog device is not open by userspace, the kernel takes care of pinging it. When the open_timeout feature is in use, we should ensure that the hardware fires close to open_timeout seconds after the kernel has assumed responsibility for the device. To do this, simply reuse the logic that is already in place for ensuring the same thing when userspace is responsible for regularly pinging the device: - When watchdog_active(wdd), this patch doesn't change anything. - When !watchdog_active(wdd), the "virtual timeout" should be taken to be ->open_deadline". When the open_timeout feature is not used or the device has been opened at least once, ->open_deadline is KTIME_MAX, and the arithmetic ends up returning keepalive_interval as we used to. This has been tested on a Wandboard with various combinations of open_timeout and timeout-sec properties for the on-board watchdog by booting with 'init=/bin/sh', timestamping the lines on the serial console, and comparing the timestamp of the 'imx2-wdt 20bc000.wdog: timeout nnn sec' line with the timestamp of the 'U-Boot SPL ...' line (which appears just after reset). Suggested-by: Guenter Roeck <linux@roeck-us.net> 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>
Diffstat (limited to 'Documentation/watchdog/mlx-wdt.txt')
0 files changed, 0 insertions, 0 deletions