Skip to content

Commit

Permalink
ARM: 5627/1: Fix restoring of lr at the end of mcount
Browse files Browse the repository at this point in the history
After ftrace_trace_function is called r1 is probably clobbered so don't
try to use its value for restoring.

This was introduced in v2.6.29~38^2~7

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Uwe Kleine-König authored and Russell King committed Jul 30, 2009
1 parent e624859 commit 3ef7143
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/kernel/entry-common.S
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ trace:
sub r0, r0, #MCOUNT_INSN_SIZE
mov lr, pc
mov pc, r2
mov lr, r1 @ restore lr
ldr lr, [fp, #-4] @ restore lr
ldmia sp!, {r0-r3, pc}

#endif /* CONFIG_DYNAMIC_FTRACE */
Expand Down

0 comments on commit 3ef7143

Please sign in to comment.