Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Heiko Carstens and committed by
Linus Torvalds
8d8fdf5c 4d435f9d

+14
+14
include/linux/kallsyms.h
··· 64 64 __builtin_extract_return_addr((void *)addr)); 65 65 } 66 66 67 + #ifndef CONFIG_64BIT 68 + #define print_ip_sym(ip) \ 69 + do { \ 70 + printk("[<%08lx>]", ip); \ 71 + print_symbol(" %s\n", ip); \ 72 + } while(0) 73 + #else 74 + #define print_ip_sym(ip) \ 75 + do { \ 76 + printk("[<%016lx>]", ip); \ 77 + print_symbol(" %s\n", ip); \ 78 + } while(0) 79 + #endif 80 + 67 81 #endif /*_LINUX_KALLSYMS_H*/