msm: subsystem_restart: Panic on SSR errors

Don't just warn when SSR operations such as powerup
or shutdown fail. Panic the device so that failure-point
analysis is possible.

Change-Id: I09a5ca37d8a7cfaa8fd7ed7025711c6467c20e84
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
This commit is contained in:
Vikram Mulukutla 2013-01-22 11:01:13 -08:00 committed by Iliyan Malchev
parent ad99488798
commit 0b1abb789a

View file

@ -243,7 +243,7 @@ static void do_epoch_check(struct subsys_device *dev)
if (time_first && n >= max_restarts_check) {
if ((curr_time->tv_sec - time_first->tv_sec) <
max_history_time_check) {
WARN(1, "Subsystems have crashed %d times in less than "\
panic("Subsystems have crashed %d times in less than "\
"%ld seconds!", max_restarts_check,
max_history_time_check);
}
@ -356,7 +356,7 @@ static void subsystem_restart_wq_func(struct work_struct *work)
* out, since a subsystem died in its powerup sequence.
*/
if (!mutex_trylock(powerup_lock)) {
WARN(1, "%s[%p]: Subsystem died during powerup!",
panic("%s[%p]: Subsystem died during powerup!",
__func__, current);
}
@ -569,11 +569,8 @@ static int __init subsys_restart_init(void)
restart_level = RESET_SOC;
ssr_wq = alloc_workqueue("ssr_wq", WQ_CPU_INTENSIVE, 0);
if (!ssr_wq) {
pr_err("%s: out of memory\n", __func__);
return -ENOMEM;
}
if (!ssr_wq)
panic("%s: out of memory\n", __func__);
return ssr_init_soc_restart_orders();
}