diff options
author | Rabin Vincent <rabin@rab.in> | 2010-08-10 14:33:52 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-09-02 10:25:27 -0400 |
commit | 72fa62fa5dff0e2e06491dd99c429adb137f299b (patch) | |
tree | ca0eb9c5bbf0dfb69e21a04211416e308729fab1 /arch/arm/kernel | |
parent | 09bfafac3e237415cc4b6adde49f9f28b3a42659 (diff) |
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: 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>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/entry-common.S | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 6805a7216bf8..c7a8c208a45c 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S | |||
@@ -146,6 +146,7 @@ mcount_call: | |||
146 | bl ftrace_stub | 146 | bl ftrace_stub |
147 | ldr lr, [fp, #-4] @ restore lr | 147 | ldr lr, [fp, #-4] @ restore lr |
148 | ldmia sp!, {r0-r3, pc} | 148 | ldmia sp!, {r0-r3, pc} |
149 | ENDPROC(mcount) | ||
149 | 150 | ||
150 | ENTRY(ftrace_caller) | 151 | ENTRY(ftrace_caller) |
151 | stmdb sp!, {r0-r3, lr} | 152 | stmdb sp!, {r0-r3, lr} |
@@ -158,6 +159,7 @@ ftrace_call: | |||
158 | bl ftrace_stub | 159 | bl ftrace_stub |
159 | ldr lr, [fp, #-4] @ restore lr | 160 | ldr lr, [fp, #-4] @ restore lr |
160 | ldmia sp!, {r0-r3, pc} | 161 | ldmia sp!, {r0-r3, pc} |
162 | ENDPROC(ftrace_caller) | ||
161 | 163 | ||
162 | #else | 164 | #else |
163 | 165 | ||
@@ -179,6 +181,7 @@ gnu_trace: | |||
179 | mov pc, r2 | 181 | mov pc, r2 |
180 | ldmia sp!, {r0-r3, ip, lr} | 182 | ldmia sp!, {r0-r3, ip, lr} |
181 | mov pc, ip | 183 | mov pc, ip |
184 | ENDPROC(__gnu_mcount_nc) | ||
182 | 185 | ||
183 | #ifdef CONFIG_OLD_MCOUNT | 186 | #ifdef CONFIG_OLD_MCOUNT |
184 | /* | 187 | /* |
@@ -204,13 +207,14 @@ trace: | |||
204 | mov pc, r2 | 207 | mov pc, r2 |
205 | ldr lr, [fp, #-4] @ restore lr | 208 | ldr lr, [fp, #-4] @ restore lr |
206 | ldmia sp!, {r0-r3, pc} | 209 | ldmia sp!, {r0-r3, pc} |
210 | ENDPROC(mcount) | ||
207 | #endif | 211 | #endif |
208 | 212 | ||
209 | #endif /* CONFIG_DYNAMIC_FTRACE */ | 213 | #endif /* CONFIG_DYNAMIC_FTRACE */ |
210 | 214 | ||
211 | .globl ftrace_stub | 215 | ENTRY(ftrace_stub) |
212 | ftrace_stub: | ||
213 | mov pc, lr | 216 | mov pc, lr |
217 | ENDPROC(ftrace_stub) | ||
214 | 218 | ||
215 | #endif /* CONFIG_FUNCTION_TRACER */ | 219 | #endif /* CONFIG_FUNCTION_TRACER */ |
216 | 220 | ||