From: Heiko Carstens 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 Cc: Arjan van de Ven Signed-off-by: Heiko Carstens Signed-off-by: Andrew Morton --- include/linux/kallsyms.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff -puN include/linux/kallsyms.h~lockdep-add-print_ip_sym include/linux/kallsyms.h --- a/include/linux/kallsyms.h~lockdep-add-print_ip_sym +++ a/include/linux/kallsyms.h @@ -63,4 +63,18 @@ do { \ __print_symbol(fmt, addr); \ } while(0) +#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*/ _