Commit 72fa62fa authored by Rabin Vincent's avatar Rabin Vincent Committed by Russell King

ARM: 6315/1: ftrace: add ENDPROC annotations

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: default avatarCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: default avatarRabin Vincent <rabin@rab.in>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 09bfafac
...@@ -146,6 +146,7 @@ mcount_call: ...@@ -146,6 +146,7 @@ mcount_call:
bl ftrace_stub bl ftrace_stub
ldr lr, [fp, #-4] @ restore lr ldr lr, [fp, #-4] @ restore lr
ldmia sp!, {r0-r3, pc} ldmia sp!, {r0-r3, pc}
ENDPROC(mcount)
ENTRY(ftrace_caller) ENTRY(ftrace_caller)
stmdb sp!, {r0-r3, lr} stmdb sp!, {r0-r3, lr}
...@@ -158,6 +159,7 @@ ftrace_call: ...@@ -158,6 +159,7 @@ ftrace_call:
bl ftrace_stub bl ftrace_stub
ldr lr, [fp, #-4] @ restore lr ldr lr, [fp, #-4] @ restore lr
ldmia sp!, {r0-r3, pc} ldmia sp!, {r0-r3, pc}
ENDPROC(ftrace_caller)
#else #else
...@@ -179,6 +181,7 @@ gnu_trace: ...@@ -179,6 +181,7 @@ gnu_trace:
mov pc, r2 mov pc, r2
ldmia sp!, {r0-r3, ip, lr} ldmia sp!, {r0-r3, ip, lr}
mov pc, ip mov pc, ip
ENDPROC(__gnu_mcount_nc)
#ifdef CONFIG_OLD_MCOUNT #ifdef CONFIG_OLD_MCOUNT
/* /*
...@@ -204,13 +207,14 @@ trace: ...@@ -204,13 +207,14 @@ trace:
mov pc, r2 mov pc, r2
ldr lr, [fp, #-4] @ restore lr ldr lr, [fp, #-4] @ restore lr
ldmia sp!, {r0-r3, pc} ldmia sp!, {r0-r3, pc}
ENDPROC(mcount)
#endif #endif
#endif /* CONFIG_DYNAMIC_FTRACE */ #endif /* CONFIG_DYNAMIC_FTRACE */
.globl ftrace_stub ENTRY(ftrace_stub)
ftrace_stub:
mov pc, lr mov pc, lr
ENDPROC(ftrace_stub)
#endif /* CONFIG_FUNCTION_TRACER */ #endif /* CONFIG_FUNCTION_TRACER */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment