]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ftrace: clean up function graph asm
authorSteven Rostedt <srostedt@redhat.com>
Tue, 2 Dec 2008 20:34:08 +0000 (15:34 -0500)
committerIngo Molnar <mingo@elte.hu>
Wed, 3 Dec 2008 07:56:21 +0000 (08:56 +0100)
Impact: clean up

There exists macros for x86 asm to handle x86_64 and i386.
This patch updates function graph asm to use them.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/ftrace.c

index 58832478b94e53af0437ef527f4f22ea9d54ea40..1a5b8f8cb3cc556b9953c83d80276d7dcf590a55 100644 (file)
@@ -467,28 +467,16 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
         * ignore such a protection.
         */
        asm volatile(
-#ifdef CONFIG_X86_64
-               "1: movq (%[parent_old]), %[old]\n"
-               "2: movq %[return_hooker], (%[parent_replaced])\n"
-#else
-               "1: movl (%[parent_old]), %[old]\n"
-               "2: movl %[return_hooker], (%[parent_replaced])\n"
-#endif
+               "1: " _ASM_MOV " (%[parent_old]), %[old]\n"
+               "2: " _ASM_MOV " %[return_hooker], (%[parent_replaced])\n"
                "   movl $0, %[faulted]\n"
 
                ".section .fixup, \"ax\"\n"
                "3: movl $1, %[faulted]\n"
                ".previous\n"
 
-               ".section __ex_table, \"a\"\n"
-#ifdef CONFIG_X86_64
-               "   .quad 1b, 3b\n"
-               "   .quad 2b, 3b\n"
-#else
-               "   .long 1b, 3b\n"
-               "   .long 2b, 3b\n"
-#endif
-               ".previous\n"
+               _ASM_EXTABLE(1b, 3b)
+               _ASM_EXTABLE(2b, 3b)
 
                : [parent_replaced] "=r" (parent), [old] "=r" (old),
                  [faulted] "=r" (faulted)