diff options
author | Steven Rostedt <srostedt@redhat.com> | 2008-12-02 15:34:08 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-03 02:56:21 -0500 |
commit | 347fdd9dd4e5d3f3a4e415925c35bdff1d59c3a9 (patch) | |
tree | c5556f49791524ae1dee92424afc85d78c700c1d /arch | |
parent | 8789a9e7df6bf9b93739c4c7d4e380725bc9e936 (diff) |
ftrace: clean up function graph asm
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/ftrace.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c index 58832478b94e..1a5b8f8cb3cc 100644 --- a/arch/x86/kernel/ftrace.c +++ b/arch/x86/kernel/ftrace.c | |||
@@ -467,28 +467,16 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr) | |||
467 | * ignore such a protection. | 467 | * ignore such a protection. |
468 | */ | 468 | */ |
469 | asm volatile( | 469 | asm volatile( |
470 | #ifdef CONFIG_X86_64 | 470 | "1: " _ASM_MOV " (%[parent_old]), %[old]\n" |
471 | "1: movq (%[parent_old]), %[old]\n" | 471 | "2: " _ASM_MOV " %[return_hooker], (%[parent_replaced])\n" |
472 | "2: movq %[return_hooker], (%[parent_replaced])\n" | ||
473 | #else | ||
474 | "1: movl (%[parent_old]), %[old]\n" | ||
475 | "2: movl %[return_hooker], (%[parent_replaced])\n" | ||
476 | #endif | ||
477 | " movl $0, %[faulted]\n" | 472 | " movl $0, %[faulted]\n" |
478 | 473 | ||
479 | ".section .fixup, \"ax\"\n" | 474 | ".section .fixup, \"ax\"\n" |
480 | "3: movl $1, %[faulted]\n" | 475 | "3: movl $1, %[faulted]\n" |
481 | ".previous\n" | 476 | ".previous\n" |
482 | 477 | ||
483 | ".section __ex_table, \"a\"\n" | 478 | _ASM_EXTABLE(1b, 3b) |
484 | #ifdef CONFIG_X86_64 | 479 | _ASM_EXTABLE(2b, 3b) |
485 | " .quad 1b, 3b\n" | ||
486 | " .quad 2b, 3b\n" | ||
487 | #else | ||
488 | " .long 1b, 3b\n" | ||
489 | " .long 2b, 3b\n" | ||
490 | #endif | ||
491 | ".previous\n" | ||
492 | 480 | ||
493 | : [parent_replaced] "=r" (parent), [old] "=r" (old), | 481 | : [parent_replaced] "=r" (parent), [old] "=r" (old), |
494 | [faulted] "=r" (faulted) | 482 | [faulted] "=r" (faulted) |