ftrace, ia64: Add macro for ftrace_caller
authorShaohua Li <shaohua.li@intel.com>
Fri, 9 Jan 2009 03:29:42 +0000 (11:29 +0800)
committerIngo Molnar <mingo@elte.hu>
Wed, 14 Jan 2009 11:11:18 +0000 (12:11 +0100)
Define FTRACE_ADDR. In IA64, a function pointer isn't a 'unsigned long' but a
'struct {unsigned long ip, unsigned long gp}'.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/ftrace.h
kernel/trace/ftrace.c

index 677432b9cb7e6e45dc98c400b304689d0cb4ca13..0547214875744716085a8f5261d09299e99b7517 100644 (file)
@@ -126,6 +126,10 @@ extern int ftrace_update_ftrace_func(ftrace_func_t func);
 extern void ftrace_caller(void);
 extern void ftrace_call(void);
 extern void mcount_call(void);
+
+#ifndef FTRACE_ADDR
+#define FTRACE_ADDR ((unsigned long)ftrace_caller)
+#endif
 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
 extern void ftrace_graph_caller(void);
 extern int ftrace_enable_ftrace_graph_caller(void);
index 76bb884b6e169530909cc2305427415ca85d72b9..9f536108d3f3dfbf24c5509454a373077b660470 100644 (file)
@@ -455,7 +455,7 @@ __ftrace_replace_code(struct dyn_ftrace *rec, int enable)
        unsigned long ip, fl;
        unsigned long ftrace_addr;
 
-       ftrace_addr = (unsigned long)ftrace_caller;
+       ftrace_addr = (unsigned long)FTRACE_ADDR;
 
        ip = rec->ip;