aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/entry_64.S
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2008-05-14 23:49:44 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-05-23 16:43:11 -0400
commit4e491d14f2506b218d678935c25a7027b79178b1 (patch)
treec61c3ca40fe85f8556c579e50e0cb563ffcd06da /arch/powerpc/kernel/entry_64.S
parente0eca07badc023a675a61906020b397da20f07c3 (diff)
ftrace: support for PowerPC
This patch adds full support for ftrace for PowerPC (both 64 and 32 bit). This includes dynamic tracing and function filtering. Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/powerpc/kernel/entry_64.S')
-rw-r--r--arch/powerpc/kernel/entry_64.S62
1 files changed, 62 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index c0db5b769e55..2c4d9e056ead 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -870,3 +870,65 @@ _GLOBAL(enter_prom)
870 ld r0,16(r1) 870 ld r0,16(r1)
871 mtlr r0 871 mtlr r0
872 blr 872 blr
873
874#ifdef CONFIG_FTRACE
875#ifdef CONFIG_DYNAMIC_FTRACE
876_GLOBAL(mcount)
877_GLOBAL(_mcount)
878 /* Taken from output of objdump from lib64/glibc */
879 mflr r3
880 stdu r1, -112(r1)
881 std r3, 128(r1)
882 .globl mcount_call
883mcount_call:
884 bl ftrace_stub
885 nop
886 ld r0, 128(r1)
887 mtlr r0
888 addi r1, r1, 112
889 blr
890
891_GLOBAL(ftrace_caller)
892 /* Taken from output of objdump from lib64/glibc */
893 mflr r3
894 ld r11, 0(r1)
895 stdu r1, -112(r1)
896 std r3, 128(r1)
897 ld r4, 16(r11)
898.globl ftrace_call
899ftrace_call:
900 bl ftrace_stub
901 nop
902 ld r0, 128(r1)
903 mtlr r0
904 addi r1, r1, 112
905_GLOBAL(ftrace_stub)
906 blr
907#else
908_GLOBAL(mcount)
909 blr
910
911_GLOBAL(_mcount)
912 /* Taken from output of objdump from lib64/glibc */
913 mflr r3
914 ld r11, 0(r1)
915 stdu r1, -112(r1)
916 std r3, 128(r1)
917 ld r4, 16(r11)
918
919
920 LOAD_REG_ADDR(r5,ftrace_trace_function)
921 ld r5,0(r5)
922 ld r5,0(r5)
923 mtctr r5
924 bctrl
925
926 nop
927 ld r0, 128(r1)
928 mtlr r0
929 addi r1, r1, 112
930_GLOBAL(ftrace_stub)
931 blr
932
933#endif
934#endif