[PATCH 4/5] Add macro for ftrace_caller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The same reason as last patch (function isn't a 'unsigned long').
Define FTRACE_ADDR.

Signed-off-by: Shaohua Li <shaohua.li@xxxxxxxxx>
---
 include/linux/ftrace.h |    4 ++++
 kernel/trace/ftrace.c  |    2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

Index: linux/include/linux/ftrace.h
===================================================================
--- linux.orig/include/linux/ftrace.h	2008-12-23 13:11:27.000000000 +0800
+++ linux/include/linux/ftrace.h	2008-12-23 13:28:29.000000000 +0800
@@ -126,6 +126,10 @@ extern int ftrace_update_ftrace_func(ftr
 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: linux/kernel/trace/ftrace.c
===================================================================
--- linux.orig/kernel/trace/ftrace.c	2008-12-23 13:24:59.000000000 +0800
+++ linux/kernel/trace/ftrace.c	2008-12-23 13:28:29.000000000 +0800
@@ -455,7 +455,7 @@ __ftrace_replace_code(struct dyn_ftrace 
 	unsigned long ip, fl;
 	unsigned long ftrace_addr;
 
-	ftrace_addr = (unsigned long)ftrace_caller;
+	ftrace_addr = (unsigned long)FTRACE_ADDR;
 
 	ip = rec->ip;
 


--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Sparc Linux]     [DCCP]     [Linux ARM]     [Yosemite News]     [Linux SCSI]     [Linux x86_64]     [Linux for Ham Radio]

  Powered by Linux