OSDN Git Service

drivers: power: Add watchdog timer to catch drivers which lockup during suspend.
authorBenoit Goby <benoit@android.com>
Thu, 13 Aug 2009 16:40:42 +0000 (09:40 -0700)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Fri, 12 Dec 2014 14:43:23 +0000 (22:43 +0800)
commit8bb60eea753cb9dcf12b529397632ce982a64740
tree1d04afcb59a30ef84e46fbaf7d63bba842dc2c23
parent088c6e9a1b4ab320f22e267df86f6b236cd8d3a6
drivers: power: Add watchdog timer to catch drivers which lockup during suspend.

Rather than hard-lock the kernel, dump the suspend thread stack and
BUG() when a driver takes too long to suspend.  The timeout is set
to 12 seconds to be longer than the usbhid 10 second timeout.

Exclude from the watchdog the time spent waiting for children that
are resumed asynchronously and time every device, whether or not they
resumed synchronously.

Change-Id: Ifd211c06b104860c2fee6eecfe0d61774aa4508a
Original-author: San Mehat <san@google.com>
Signed-off-by: Benoit Goby <benoit@android.com>
drivers/base/power/main.c