summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/entry_32.S
diff options
context:
space:
mode:
authorAbhishek Sagar <sagar.abhishek@gmail.com>2008-06-21 20:17:27 +0200
committerIngo Molnar <mingo@elte.hu>2008-06-23 22:10:56 +0200
commit395a59d0f8e86bb39cd700c3d185d30c670bb958 (patch)
tree1558e635efcede901c5dbe9acd625d475db5b369 /arch/powerpc/kernel/entry_32.S
parentMerge branch 'linus' into tracing/ftrace (diff)
downloadlinux-395a59d0f8e86bb39cd700c3d185d30c670bb958.tar.xz
linux-395a59d0f8e86bb39cd700c3d185d30c670bb958.zip
ftrace: store mcount address in rec->ip
Record the address of the mcount call-site. Currently all archs except sparc64 record the address of the instruction following the mcount call-site. Some general cleanups are entailed. Storing mcount addresses in rec->ip enables looking them up in the kprobe hash table later on to check if they're kprobe'd. Signed-off-by: Abhishek Sagar <sagar.abhishek@gmail.com> Cc: davem@davemloft.net Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/powerpc/kernel/entry_32.S')
-rw-r--r--arch/powerpc/kernel/entry_32.S4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
index 3b1dd29d9f91..7231a708af0d 100644
--- a/arch/powerpc/kernel/entry_32.S
+++ b/arch/powerpc/kernel/entry_32.S
@@ -30,6 +30,7 @@
#include <asm/ppc_asm.h>
#include <asm/asm-offsets.h>
#include <asm/unistd.h>
+#include <asm/ftrace.h>
#undef SHOW_SYSCALLS
#undef SHOW_SYSCALLS_TASK
@@ -1053,6 +1054,7 @@ _GLOBAL(_mcount)
stw r10,40(r1)
stw r3, 44(r1)
stw r5, 8(r1)
+ subi r3, r3, MCOUNT_INSN_SIZE
.globl mcount_call
mcount_call:
bl ftrace_stub
@@ -1090,6 +1092,7 @@ _GLOBAL(ftrace_caller)
stw r10,40(r1)
stw r3, 44(r1)
stw r5, 8(r1)
+ subi r3, r3, MCOUNT_INSN_SIZE
.globl ftrace_call
ftrace_call:
bl ftrace_stub
@@ -1128,6 +1131,7 @@ _GLOBAL(_mcount)
stw r3, 44(r1)
stw r5, 8(r1)
+ subi r3, r3, MCOUNT_INSN_SIZE
LOAD_REG_ADDR(r5, ftrace_trace_function)
lwz r5,0(r5)