summaryrefslogtreecommitdiff
path: root/lib/spinlock_debug.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-12-07 02:14:01 +0100
committerAndi Kleen <andi@basil.nowhere.org>2006-12-07 02:14:01 +0100
commitbb81a09e55eaf7e5f798468ab971469b6f66a259 (patch)
treecf1ed6b0ad75137361228955535044fd4630a57b /lib/spinlock_debug.c
parente5e3a0428968dcc1f9318ce1c941a918e99f8b84 (diff)
downloadlwn-bb81a09e55eaf7e5f798468ab971469b6f66a259.tar.gz
lwn-bb81a09e55eaf7e5f798468ab971469b6f66a259.zip
[PATCH] x86: all cpu backtrace
When a spinlock lockup occurs, arrange for the NMI code to emit an all-cpu backtrace, so we get to see which CPU is holding the lock, and where. Cc: Andi Kleen <ak@muc.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: Badari Pulavarty <pbadari@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'lib/spinlock_debug.c')
-rw-r--r--lib/spinlock_debug.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/spinlock_debug.c b/lib/spinlock_debug.c
index b6c4f898197c..479fd462eaa9 100644
--- a/lib/spinlock_debug.c
+++ b/lib/spinlock_debug.c
@@ -7,6 +7,7 @@
*/
#include <linux/spinlock.h>
+#include <linux/nmi.h>
#include <linux/interrupt.h>
#include <linux/debug_locks.h>
#include <linux/delay.h>
@@ -117,6 +118,9 @@ static void __spin_lock_debug(spinlock_t *lock)
raw_smp_processor_id(), current->comm,
current->pid, lock);
dump_stack();
+#ifdef CONFIG_SMP
+ trigger_all_cpu_backtrace();
+#endif
}
}
}