Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286904
b: refs/heads/master
c: d68133b
h: refs/heads/master
v: v3
  • Loading branch information
Rabin Vincent authored and Russell King committed Jan 25, 2012
1 parent 50291bc commit ea2bef7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 34ae6c96a6a7db4ed8ec0524bf7fa1086b9ab2ba
refs/heads/master: d68133b5a81bd9c4b673c2a731ac1a33a9dc0cb8
15 changes: 9 additions & 6 deletions trunk/arch/arm/kernel/entry-common.S
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ ENDPROC(ret_from_fork)
#endif
#endif

.macro mcount_adjust_addr rd, rn
bic \rd, \rn, #1 @ clear the Thumb bit if present
sub \rd, \rd, #MCOUNT_INSN_SIZE
.endm

.macro __mcount suffix
mcount_enter
ldr r0, =ftrace_trace_function
Expand All @@ -173,8 +178,7 @@ ENDPROC(ret_from_fork)
mcount_exit

1: mcount_get_lr r1 @ lr of instrumented func
mov r0, lr @ instrumented function
sub r0, r0, #MCOUNT_INSN_SIZE
mcount_adjust_addr r0, lr @ instrumented function
adr lr, BSYM(2f)
mov pc, r2
2: mcount_exit
Expand All @@ -184,8 +188,7 @@ ENDPROC(ret_from_fork)
mcount_enter

mcount_get_lr r1 @ lr of instrumented func
mov r0, lr @ instrumented function
sub r0, r0, #MCOUNT_INSN_SIZE
mcount_adjust_addr r0, lr @ instrumented function

.globl ftrace_call\suffix
ftrace_call\suffix:
Expand All @@ -205,11 +208,11 @@ ftrace_graph_call\suffix:
#ifdef CONFIG_DYNAMIC_FTRACE
@ called from __ftrace_caller, saved in mcount_enter
ldr r1, [sp, #16] @ instrumented routine (func)
mcount_adjust_addr r1, r1
#else
@ called from __mcount, untouched in lr
mov r1, lr @ instrumented routine (func)
mcount_adjust_addr r1, lr @ instrumented routine (func)
#endif
sub r1, r1, #MCOUNT_INSN_SIZE
mov r2, fp @ frame pointer
bl prepare_ftrace_return
mcount_exit
Expand Down

0 comments on commit ea2bef7

Please sign in to comment.