summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/entry-common.S
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2009-08-15 16:51:48 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-08-15 16:51:48 +0100
commit9b2616c2e8cc98ca98bbb40cad83a8d3d859e840 (patch)
tree5a971fa57298d58529d3ae82b68cbfc7139bde7b /arch/arm/kernel/entry-common.S
parent590a94d93475fa6cca257f161ae268ed3a2395b5 (diff)
parentac25150f2c55ea26447af0fa1d4e2bb07f97384d (diff)
downloadop-kernel-dev-9b2616c2e8cc98ca98bbb40cad83a8d3d859e840.zip
op-kernel-dev-9b2616c2e8cc98ca98bbb40cad83a8d3d859e840.tar.gz
Merge branch 'for-rmk-2.6.32' of git://git.pengutronix.de/git/ukl/linux-2.6 into devel-stable
Diffstat (limited to 'arch/arm/kernel/entry-common.S')
-rw-r--r--arch/arm/kernel/entry-common.S19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index a0540c9..df19e8b 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -118,6 +118,25 @@ ftrace_call:
#else
+ENTRY(__gnu_mcount_nc)
+ stmdb sp!, {r0-r3, lr}
+ ldr r0, =ftrace_trace_function
+ ldr r2, [r0]
+ adr r0, ftrace_stub
+ cmp r0, r2
+ bne gnu_trace
+ ldmia sp!, {r0-r3, ip, lr}
+ bx ip
+
+gnu_trace:
+ ldr r1, [sp, #20] @ lr of instrumented routine
+ mov r0, lr
+ sub r0, r0, #MCOUNT_INSN_SIZE
+ mov lr, pc
+ mov pc, r2
+ ldmia sp!, {r0-r3, ip, lr}
+ bx ip
+
ENTRY(mcount)
stmdb sp!, {r0-r3, lr}
ldr r0, =ftrace_trace_function
OpenPOWER on IntegriCloud