Thread (4 messages) read the whole thread 4 messages, 1 author, 2008-07-17
STALE6590d

[PATCH 2/4] powerpc: ftrace: Use ppc_function_entry() rather than hand-rolled macro

From: Michael Ellerman <hidden>
Date: 2008-07-17 07:21:31
Subsystem: function hooks (ftrace), linux for powerpc (32-bit and 64-bit), the rest · Maintainers: Steven Rostedt, Masami Hiramatsu, Madhavan Srinivasan, Linus Torvalds

Signed-off-by: Michael Ellerman <redacted>
---
 arch/powerpc/kernel/ftrace.c |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)
diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c
index 78f4423..1d6f174 100644
--- a/arch/powerpc/kernel/ftrace.c
+++ b/arch/powerpc/kernel/ftrace.c
@@ -19,14 +19,6 @@
 #include <asm/ftrace.h>
 
 
-#ifdef CONFIG_PPC32
-# define GET_ADDR(addr) addr
-#else
-/* PowerPC64's functions are data that points to the functions */
-# define GET_ADDR(addr) *(unsigned long *)addr
-#endif
-
-
 static unsigned int notrace ftrace_calc_offset(long ip, long addr)
 {
 	return (int)(addr - ip);
@@ -49,7 +41,7 @@ notrace unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr)
 	 * instruction that is going to be modified, without modifying the
 	 * code.
 	 */
-	addr = GET_ADDR(addr);
+	addr = ppc_function_entry((void *)addr);
 
 	/* Set to "bl addr" */
 	op = 0x48000001 | (ftrace_calc_offset(ip, addr) & 0x03fffffc);
-- 
1.5.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help