aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2006-07-03 03:24:25 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-03 18:27:00 -0400
commit8d8fdf5c76816e5263073008f03f097ffc713db3 (patch)
tree2c184b13bead7f72d800bc0dba61b43c8ba9334e /include/linux
parent4d435f9d8ff01ae726a2a84edb9c2457787a337e (diff)
[PATCH] lockdep: add print_ip_sym()
Provide a common print_ip_sym() function that prints the passed instruction pointer as well as the symbol belonging to it. Avoids adding a bunch of #ifdef CONFIG_64BIT in order to get the printk format right on 32/64 bit platforms. Acked-by: Ingo Molnar <mingo@elte.hu> Cc: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/kallsyms.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h
index ad71ac053d6e..849043ce4ed6 100644
--- a/include/linux/kallsyms.h
+++ b/include/linux/kallsyms.h
@@ -64,4 +64,18 @@ static inline void print_symbol(const char *fmt, unsigned long addr)
64 __builtin_extract_return_addr((void *)addr)); 64 __builtin_extract_return_addr((void *)addr));
65} 65}
66 66
67#ifndef CONFIG_64BIT
68#define print_ip_sym(ip) \
69do { \
70 printk("[<%08lx>]", ip); \
71 print_symbol(" %s\n", ip); \
72} while(0)
73#else
74#define print_ip_sym(ip) \
75do { \
76 printk("[<%016lx>]", ip); \
77 print_symbol(" %s\n", ip); \
78} while(0)
79#endif
80
67#endif /*_LINUX_KALLSYMS_H*/ 81#endif /*_LINUX_KALLSYMS_H*/