[PATCH 4/4] powerpc: ftrace: Use PPC_LONG and PPC_LONG_ALIGN asm macros
Michael Ellerman
michael at ellerman.id.au
Thu Jul 17 17:21:33 EST 2008
Signed-off-by: Michael Ellerman <michael at ellerman.id.au>
---
arch/powerpc/kernel/ftrace.c | 13 +++----------
1 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c
index 49a2049..0e9fc10 100644
--- a/arch/powerpc/kernel/ftrace.c
+++ b/arch/powerpc/kernel/ftrace.c
@@ -14,6 +14,7 @@
#include <linux/init.h>
#include <linux/list.h>
+#include <asm/asm-compat.h>
#include <asm/cacheflush.h>
#include <asm/code-patching.h>
#include <asm/ftrace.h>
@@ -49,14 +50,6 @@ notrace unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr)
return (unsigned char *)&op;
}
-#ifdef CONFIG_PPC64
-# define _ASM_ALIGN " .align 3 "
-# define _ASM_PTR " .llong "
-#else
-# define _ASM_ALIGN " .align 2 "
-# define _ASM_PTR " .long "
-#endif
-
notrace int
ftrace_modify_code(unsigned long ip, unsigned char *old_code,
unsigned char *new_code)
@@ -85,8 +78,8 @@ ftrace_modify_code(unsigned long ip, unsigned char *old_code,
" b 2b\n"
".previous\n"
".section __ex_table,\"a\"\n"
- _ASM_ALIGN "\n"
- _ASM_PTR "1b, 3b\n"
+ PPC_LONG_ALIGN "\n"
+ PPC_LONG "1b, 3b\n"
".previous"
: "=r"(faulted), "=r"(replaced)
: "r"(ip), "r"(new),
--
1.5.5
More information about the Linuxppc-dev
mailing list