diff options
| author | Rohit Vaswani <rvaswani@codeaurora.org> | 2014-10-02 21:02:56 -0700 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 11:16:31 -0700 |
| commit | 77d758e28363b63c9273099fc49b901def518b96 (patch) | |
| tree | 16172d18bcbab98496fb1ea72a8297231ac2b9cf /kernel/locking/spinlock_debug.c | |
| parent | a54306165324edab925b8284e189f164a834ec93 (diff) | |
lib: spinlock: Cause a watchdog bite on spin_dump
Currently we cause a BUG_ON once a spin_bug is detected, but
that causes a whole lot of processing and the other CPUs would
have proceeded to perform other actions and the state of the system
is moved by the time we can analyze it.
Provide an option to trigger a watchdog bite instead so that we
can get the traces as close to the issue as possible.
Change-Id: Ic8d692ebd02c6940a3b4e5798463744db20b0026
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Diffstat (limited to 'kernel/locking/spinlock_debug.c')
| -rw-r--r-- | kernel/locking/spinlock_debug.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/locking/spinlock_debug.c b/kernel/locking/spinlock_debug.c index 161eb593ea08..e99d8603de14 100644 --- a/kernel/locking/spinlock_debug.c +++ b/kernel/locking/spinlock_debug.c @@ -13,6 +13,7 @@ #include <linux/delay.h> #include <linux/export.h> #include <linux/bug.h> +#include <soc/qcom/watchdog.h> void __raw_spin_lock_init(raw_spinlock_t *lock, const char *name, struct lock_class_key *key) @@ -65,7 +66,11 @@ static void spin_dump(raw_spinlock_t *lock, const char *msg) owner ? owner->comm : "<none>", owner ? task_pid_nr(owner) : -1, lock->owner_cpu); - BUG_ON(PANIC_CORRUPTION); +#ifdef CONFIG_DEBUG_SPINLOCK_BITE_ON_BUG + msm_trigger_wdog_bite(); +#elif defined(CONFIG_DEBUG_SPINLOCK_PANIC_ON_BUG) + BUG(); +#endif dump_stack(); } |
