1
0
Fork 0
Commit Graph

6 Commits (1076fe28af4fb6cdd93a2b82247b36ce26180150)

Author SHA1 Message Date
Alexander Usyskin 2eccf0e0bc watchdog: mei_wdt: request stop on reboot to prevent false positive event
commit 9eff1140a8 upstream.

Systemd on reboot enables shutdown watchdog that leaves the watchdog
device open to ensure that even if power down process get stuck the
platform reboots nonetheless.
The iamt_wdt is an alarm-only watchdog and can't reboot system, but the
FW will generate an alarm event reboot was completed in time, as the
watchdog is not automatically disabled during power cycle.
So we should request stop watchdog on reboot to eliminate wrong alarm
from the FW.

Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-06 10:40:16 +01:00
Tomas Winkler 3a20a5c339 watchdog: mei_wdt: re-register device on event
For Intel SKL platform the ME device can inform the host via
asynchronous notification that the watchdog feature was activated
on the device. The activation doesn't require reboot.
In that case the driver registers the watchdog device with the kernel.

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 13:00:52 -08:00
Tomas Winkler ad1cd720b1 watchdog: mei_wdt: add activation debugfs entry
Add entry for displaying whether the device has activated or
deactivated watchdog fw application.

cat <debugfs>/mei_wdt/activation
activated | deactivated

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 13:00:52 -08:00
Tomas Winkler 7a23f80eaa watchdog: mei_wdt: register wd device only if required
For Intel Broadwell and newer platforms, the ME device can inform
the host whether the watchdog functionality is activated or not.
If the watchdog functionality is not activated then the watchdog interface
can be not registered and eliminate unnecessary pings and hence lower the
power consumption by avoiding waking up the device.
The feature can be deactivated also without reboot
in that case the watchdog device should be unregistered at runtime.

The information regarding the deactivation is reported
in the ping response command. In runtime case the unregistration
has to be run from a worker so that the ping initiated by the watchdog
core completes. Otherwise the flow will deadlock on watchdog
core mutex which both ping and unregistration acquire.

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 13:00:52 -08:00
Tomas Winkler c9cf20ee45 watchdog: mei_wdt: add status debugfs entry
Add entry for displaying current watchdog internal state

cat <debugfs>/mei_wdt/state
IDLE|START|RUNNING|STOPPING

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-06 22:11:06 -08:00
Tomas Winkler 222818c3d8 watchdog: mei_wdt: implement MEI iAMT watchdog driver
Create a driver with the generic watchdog interface
for the MEI iAMT watchdog device.

Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-06 22:11:06 -08:00