]> git.karo-electronics.de Git - karo-tx-linux.git/commit
spinlock_debug: print kallsyms name for lock
authorStephen Boyd <sboyd@codeaurora.org>
Thu, 3 May 2012 05:44:30 +0000 (15:44 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 3 May 2012 05:46:50 +0000 (15:46 +1000)
commit96dc1a2cd13c24dafa152d49d1491fc12c08d601
tree9b7bece6baae3b0b6714d76e5065b1b4a4212a85
parent6f479d3aa3d103341eb5c09d5d05ee9a43d3fa7a
spinlock_debug: print kallsyms name for lock

When a spinlock warning is printed we usually get

 BUG: spinlock bad magic on CPU#0, modprobe/111
  lock: 0xdff09f38, .magic: 00000000, .owner: /0, .owner_cpu: 0

but it's nicer to print the symbol for the lock if we have it so that we
can avoid 'grep dff09f38 /proc/kallsyms' to find out which lock it was.
Use kallsyms to print the symbol name so we get something a bit easier to
read

 BUG: spinlock bad magic on CPU#0, modprobe/112
  lock: test_lock, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0

If the lock is not in kallsyms %ps will fall back to printing the address
directly.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/spinlock_debug.c