summaryrefslogtreecommitdiff
path: root/kernel/locking/spinlock_debug.c
diff options
context:
space:
mode:
authorPrasad Sodagudi <psodagud@codeaurora.org>2015-04-11 06:06:26 +0530
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:16:32 -0700
commit805c18d71c615b62bb9e7b86afed8ce1f4273973 (patch)
tree6407384cedd16bb27064a7b3b77eaf9481b6b3c1 /kernel/locking/spinlock_debug.c
parent77d758e28363b63c9273099fc49b901def518b96 (diff)
lib: spinlock: Trigger a watchdog bite on spin_dump for rwlock
Currently dump_stack is printed once a spin_bug is detected for rwlock. So provide an options to trigger a panic or watchdog bite for debugging rwlock magic corruptions and lockups. Change-Id: I20807e8eceb8b81635e58701d1f9f9bd36ab5877 [abhimany: replace msm with qcom] Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org> Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
Diffstat (limited to 'kernel/locking/spinlock_debug.c')
-rw-r--r--kernel/locking/spinlock_debug.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/locking/spinlock_debug.c b/kernel/locking/spinlock_debug.c
index e99d8603de14..d381f559e0ce 100644
--- a/kernel/locking/spinlock_debug.c
+++ b/kernel/locking/spinlock_debug.c
@@ -174,6 +174,11 @@ static void rwlock_bug(rwlock_t *lock, const char *msg)
printk(KERN_EMERG "BUG: rwlock %s on CPU#%d, %s/%d, %p\n",
msg, raw_smp_processor_id(), current->comm,
task_pid_nr(current), lock);
+#ifdef CONFIG_DEBUG_SPINLOCK_BITE_ON_BUG
+ msm_trigger_wdog_bite();
+#elif defined(CONFIG_DEBUG_SPINLOCK_PANIC_ON_BUG)
+ BUG();
+#endif
dump_stack();
}