]> asedeno.scripts.mit.edu Git - linux.git/commit
watchdog: hpwdt: Programable Pretimeout NMI
authorJerry Hoemann <jerry.hoemann@hpe.com>
Mon, 26 Feb 2018 03:22:25 +0000 (20:22 -0700)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Sat, 3 Mar 2018 16:04:18 +0000 (17:04 +0100)
commit0458f403fee348edd3457530dee57c0f946a0df6
tree509d83c03a93305603aa1caf6996252450636050
parent703fc3df91eacdaee8bf63996fb3a76de55dbb5e
watchdog: hpwdt: Programable Pretimeout NMI

Make whether or not the hpwdt watchdog delivers a pretimeout NMI
programable by the user.

The underlying iLO hardware is programmable as to whether or not
a pre-timeout NMI is delivered to the system before the iLO resets
the system.  However, the iLO does not allow for programming the
length of time that NMI is delivered before the system is reset.

By watchdog API, in hpwdt_set_pretimeout a val == 0 disables the NMI.
When val != 0, hpwdt_set_pretimeout will enable the pretimeout NMI
provided the current timeout is greator than the HW specified
pretimeout length. Otherwise an error is returned.

In set_timeout, if the new timeout is <= an already established pretimeout,
the pretimeout is canceled.  This matches the action watchdog_set_timeout
in the watchdog core would do if an hpwdt specific set_timeout
function wasn't specified.

Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/hpwdt.c