Skip to content

Commit

Permalink
ARM: 6315/1: ftrace: add ENDPROC annotations
Browse files Browse the repository at this point in the history
When building as Thumb-2, the ".type foo, %function" annotation in
ENDPROC seems to be required in order for the assembly routines to be
recognized as Thumb-2 code.  If the ENDPROC annotations are not present,
calls to these routines are generated as BLX instead of BL.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Rabin Vincent authored and Russell King committed Sep 2, 2010
1 parent 09bfafa commit 72fa62f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions arch/arm/kernel/entry-common.S
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ mcount_call:
bl ftrace_stub
ldr lr, [fp, #-4] @ restore lr
ldmia sp!, {r0-r3, pc}
ENDPROC(mcount)

ENTRY(ftrace_caller)
stmdb sp!, {r0-r3, lr}
Expand All @@ -158,6 +159,7 @@ ftrace_call:
bl ftrace_stub
ldr lr, [fp, #-4] @ restore lr
ldmia sp!, {r0-r3, pc}
ENDPROC(ftrace_caller)

#else

Expand All @@ -179,6 +181,7 @@ gnu_trace:
mov pc, r2
ldmia sp!, {r0-r3, ip, lr}
mov pc, ip
ENDPROC(__gnu_mcount_nc)

#ifdef CONFIG_OLD_MCOUNT
/*
Expand All @@ -204,13 +207,14 @@ trace:
mov pc, r2
ldr lr, [fp, #-4] @ restore lr
ldmia sp!, {r0-r3, pc}
ENDPROC(mcount)
#endif

#endif /* CONFIG_DYNAMIC_FTRACE */

.globl ftrace_stub
ftrace_stub:
ENTRY(ftrace_stub)
mov pc, lr
ENDPROC(ftrace_stub)

#endif /* CONFIG_FUNCTION_TRACER */

Expand Down

0 comments on commit 72fa62f

Please sign in to comment.