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)
committerArve Hjønnevåg <arve@android.com>
Mon, 1 Jul 2013 20:34:57 +0000 (13:34 -0700)
commit2c3e239f2c102292d10c3131075e23b01b8e2fcd
tree0bf1ccd98070c71fc6d5eca4c834bcce1fd13573
parent859cc17a0027e11614de33f3c5e9df9701a83c10
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