aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/watchdog
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2016-02-28 16:12:15 -0500
committerWim Van Sebroeck <wim@iguana.be>2016-03-16 16:11:14 -0400
commit664a39236e718f9f03fa73fc01006da9ced04efc (patch)
tree116bfdc2660493a14cc08769d23236c1070b533a /Documentation/watchdog
parentfb32e9b9deeb5df2913deb7d2ae8c36f4f66ecf3 (diff)
watchdog: Introduce hardware maximum heartbeat in watchdog core
Introduce an optional hardware maximum heartbeat in the watchdog core. The hardware maximum heartbeat can be lower than the maximum timeout. Drivers can set the maximum hardware heartbeat value in the watchdog data structure. If the configured timeout exceeds the maximum hardware heartbeat, the watchdog core enables a timer function to assist sending keepalive requests to the watchdog driver. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'Documentation/watchdog')
-rw-r--r--Documentation/watchdog/watchdog-kernel-api.txt19
1 files changed, 17 insertions, 2 deletions
diff --git a/Documentation/watchdog/watchdog-kernel-api.txt b/Documentation/watchdog/watchdog-kernel-api.txt
index dd8f912c0576..15a02595ade1 100644
--- a/Documentation/watchdog/watchdog-kernel-api.txt
+++ b/Documentation/watchdog/watchdog-kernel-api.txt
@@ -52,6 +52,7 @@ struct watchdog_device {
52 unsigned int timeout; 52 unsigned int timeout;
53 unsigned int min_timeout; 53 unsigned int min_timeout;
54 unsigned int max_timeout; 54 unsigned int max_timeout;
55 unsigned int max_hw_heartbeat_ms;
55 struct notifier_block reboot_nb; 56 struct notifier_block reboot_nb;
56 struct notifier_block restart_nb; 57 struct notifier_block restart_nb;
57 void *driver_data; 58 void *driver_data;
@@ -73,8 +74,18 @@ It contains following fields:
73 additional information about the watchdog timer itself. (Like it's unique name) 74 additional information about the watchdog timer itself. (Like it's unique name)
74* ops: a pointer to the list of watchdog operations that the watchdog supports. 75* ops: a pointer to the list of watchdog operations that the watchdog supports.
75* timeout: the watchdog timer's timeout value (in seconds). 76* timeout: the watchdog timer's timeout value (in seconds).
77 This is the time after which the system will reboot if user space does
78 not send a heartbeat request if WDOG_ACTIVE is set.
76* min_timeout: the watchdog timer's minimum timeout value (in seconds). 79* min_timeout: the watchdog timer's minimum timeout value (in seconds).
77* max_timeout: the watchdog timer's maximum timeout value (in seconds). 80 If set, the minimum configurable value for 'timeout'.
81* max_timeout: the watchdog timer's maximum timeout value (in seconds),
82 as seen from userspace. If set, the maximum configurable value for
83 'timeout'. Not used if max_hw_heartbeat_ms is non-zero.
84* max_hw_heartbeat_ms: Maximum hardware heartbeat, in milli-seconds.
85 If set, the infrastructure will send heartbeats to the watchdog driver
86 if 'timeout' is larger than max_hw_heartbeat_ms, unless WDOG_ACTIVE
87 is set and userspace failed to send a heartbeat for at least 'timeout'
88 seconds.
78* reboot_nb: notifier block that is registered for reboot notifications, for 89* reboot_nb: notifier block that is registered for reboot notifications, for
79 internal use only. If the driver calls watchdog_stop_on_reboot, watchdog core 90 internal use only. If the driver calls watchdog_stop_on_reboot, watchdog core
80 will stop the watchdog on such notifications. 91 will stop the watchdog on such notifications.
@@ -153,7 +164,11 @@ they are supported. These optional routines/operations are:
153 and -EIO for "could not write value to the watchdog". On success this 164 and -EIO for "could not write value to the watchdog". On success this
154 routine should set the timeout value of the watchdog_device to the 165 routine should set the timeout value of the watchdog_device to the
155 achieved timeout value (which may be different from the requested one 166 achieved timeout value (which may be different from the requested one
156 because the watchdog does not necessarily has a 1 second resolution). 167 because the watchdog does not necessarily have a 1 second resolution).
168 Drivers implementing max_hw_heartbeat_ms set the hardware watchdog heartbeat
169 to the minimum of timeout and max_hw_heartbeat_ms. Those drivers set the
170 timeout value of the watchdog_device either to the requested timeout value
171 (if it is larger than max_hw_heartbeat_ms), or to the achieved timeout value.
157 (Note: the WDIOF_SETTIMEOUT needs to be set in the options field of the 172 (Note: the WDIOF_SETTIMEOUT needs to be set in the options field of the
158 watchdog's info structure). 173 watchdog's info structure).
159 If the watchdog driver does not have to perform any action but setting the 174 If the watchdog driver does not have to perform any action but setting the