Skip to content

Commit

Permalink
[PATCH] lockdep: add print_ip_sym()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiko Carstens authored and Linus Torvalds committed Jul 3, 2006
1 parent 4d435f9 commit 8d8fdf5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions include/linux/kallsyms.h
Original file line number Diff line number Diff line change
Expand Up @@ -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*/

0 comments on commit 8d8fdf5

Please sign in to comment.