]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
watchdog: mei_wdt: register wd device only if required
authorTomas Winkler <tomas.winkler@intel.com>
Sun, 7 Feb 2016 20:46:48 +0000 (22:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Feb 2016 21:00:52 +0000 (13:00 -0800)
commit7a23f80eaae9c6b5175cd7a96634a91ed9928aff
treeba308c5af8f7d9536966c8738cb6a9ba4f89a3fb
parente97cdb303c04bfe60283094bdced68a0d363bd5d
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>
drivers/watchdog/mei_wdt.c