diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2014-11-25 07:31:46 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-12-03 11:08:00 -0500 |
commit | 13d1b9575ac2c2da143cd2236b6cf0fc314570f8 (patch) | |
tree | 01c25f94a5f08fb5502b0fbe0c71fd0cf1ed1a41 /arch/arm/kernel/iwmmxt.S | |
parent | f3a04202c519a1b496a63d83fc92067fe695f69a (diff) |
ARM: 8221/1: PJ4: allow building in Thumb-2 mode
Two files that get included when building the multi_v7_defconfig target
fail to build when selecting THUMB2_KERNEL for this configuration.
In both cases, we can just build the file as ARM code, as none of its
symbols are exported to modules, so there are no interworking concerns.
In the iwmmxt.S case, add ENDPROC() declarations so the symbols are
annotated as functions, resulting in the linker to emit the appropriate
mode switches.
Acked-by: Nicolas Pitre <nico@linaro.org>
Tested-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/iwmmxt.S')
-rw-r--r-- | arch/arm/kernel/iwmmxt.S | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/kernel/iwmmxt.S b/arch/arm/kernel/iwmmxt.S index ad58e565fe98..49fadbda8c63 100644 --- a/arch/arm/kernel/iwmmxt.S +++ b/arch/arm/kernel/iwmmxt.S | |||
@@ -58,6 +58,7 @@ | |||
58 | #define MMX_SIZE (0x98) | 58 | #define MMX_SIZE (0x98) |
59 | 59 | ||
60 | .text | 60 | .text |
61 | .arm | ||
61 | 62 | ||
62 | /* | 63 | /* |
63 | * Lazy switching of Concan coprocessor context | 64 | * Lazy switching of Concan coprocessor context |
@@ -182,6 +183,8 @@ concan_load: | |||
182 | tmcr wCon, r2 | 183 | tmcr wCon, r2 |
183 | ret lr | 184 | ret lr |
184 | 185 | ||
186 | ENDPROC(iwmmxt_task_enable) | ||
187 | |||
185 | /* | 188 | /* |
186 | * Back up Concan regs to save area and disable access to them | 189 | * Back up Concan regs to save area and disable access to them |
187 | * (mainly for gdb or sleep mode usage) | 190 | * (mainly for gdb or sleep mode usage) |
@@ -232,6 +235,8 @@ ENTRY(iwmmxt_task_disable) | |||
232 | 1: msr cpsr_c, ip @ restore interrupt mode | 235 | 1: msr cpsr_c, ip @ restore interrupt mode |
233 | ldmfd sp!, {r4, pc} | 236 | ldmfd sp!, {r4, pc} |
234 | 237 | ||
238 | ENDPROC(iwmmxt_task_disable) | ||
239 | |||
235 | /* | 240 | /* |
236 | * Copy Concan state to given memory address | 241 | * Copy Concan state to given memory address |
237 | * | 242 | * |
@@ -268,6 +273,8 @@ ENTRY(iwmmxt_task_copy) | |||
268 | msr cpsr_c, ip @ restore interrupt mode | 273 | msr cpsr_c, ip @ restore interrupt mode |
269 | ret r3 | 274 | ret r3 |
270 | 275 | ||
276 | ENDPROC(iwmmxt_task_copy) | ||
277 | |||
271 | /* | 278 | /* |
272 | * Restore Concan state from given memory address | 279 | * Restore Concan state from given memory address |
273 | * | 280 | * |
@@ -304,6 +311,8 @@ ENTRY(iwmmxt_task_restore) | |||
304 | msr cpsr_c, ip @ restore interrupt mode | 311 | msr cpsr_c, ip @ restore interrupt mode |
305 | ret r3 | 312 | ret r3 |
306 | 313 | ||
314 | ENDPROC(iwmmxt_task_restore) | ||
315 | |||
307 | /* | 316 | /* |
308 | * Concan handling on task switch | 317 | * Concan handling on task switch |
309 | * | 318 | * |
@@ -335,6 +344,8 @@ ENTRY(iwmmxt_task_switch) | |||
335 | mrc p15, 0, r1, c2, c0, 0 | 344 | mrc p15, 0, r1, c2, c0, 0 |
336 | sub pc, lr, r1, lsr #32 @ cpwait and return | 345 | sub pc, lr, r1, lsr #32 @ cpwait and return |
337 | 346 | ||
347 | ENDPROC(iwmmxt_task_switch) | ||
348 | |||
338 | /* | 349 | /* |
339 | * Remove Concan ownership of given task | 350 | * Remove Concan ownership of given task |
340 | * | 351 | * |
@@ -353,6 +364,8 @@ ENTRY(iwmmxt_task_release) | |||
353 | msr cpsr_c, r2 @ restore interrupts | 364 | msr cpsr_c, r2 @ restore interrupts |
354 | ret lr | 365 | ret lr |
355 | 366 | ||
367 | ENDPROC(iwmmxt_task_release) | ||
368 | |||
356 | .data | 369 | .data |
357 | concan_owner: | 370 | concan_owner: |
358 | .word 0 | 371 | .word 0 |