提交 8d8fdf5c 编写于 作者: H Heiko Carstens 提交者: Linus Torvalds

[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: NIngo Molnar <mingo@elte.hu>
Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 4d435f9d
......@@ -64,4 +64,18 @@ static inline void print_symbol(const char *fmt, unsigned long addr)
__builtin_extract_return_addr((void *)addr));
}
#ifndef CONFIG_64BIT
#define print_ip_sym(ip) \
do { \
printk("[<%08lx>]", ip); \
print_symbol(" %s\n", ip); \
} while(0)
#else
#define print_ip_sym(ip) \
do { \
printk("[<%016lx>]", ip); \
print_symbol(" %s\n", ip); \
} while(0)
#endif
#endif /*_LINUX_KALLSYMS_H*/
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册