[PATCH 1/4] powerpc: ftrace: Use PPC_NOP_INSTR #define for NOP
Michael Ellerman
michael at ellerman.id.au
Thu Jul 17 17:21:30 EST 2008
And move ftrace_nop into the only function it's used in.
Signed-off-by: Michael Ellerman <michael at ellerman.id.au>
---
arch/powerpc/kernel/ftrace.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c
index 3855ceb..78f4423 100644
--- a/arch/powerpc/kernel/ftrace.c
+++ b/arch/powerpc/kernel/ftrace.c
@@ -15,11 +15,10 @@
#include <linux/list.h>
#include <asm/cacheflush.h>
+#include <asm/code-patching.h>
#include <asm/ftrace.h>
-static unsigned int ftrace_nop = 0x60000000;
-
#ifdef CONFIG_PPC32
# define GET_ADDR(addr) addr
#else
@@ -35,6 +34,8 @@ static unsigned int notrace ftrace_calc_offset(long ip, long addr)
notrace unsigned char *ftrace_nop_replace(void)
{
+ static unsigned int ftrace_nop = PPC_NOP_INSTR;
+
return (char *)&ftrace_nop;
}
--
1.5.5
More information about the Linuxppc-dev
mailing list