diff options
author | Dave Martin <dave.martin@linaro.org> | 2011-03-04 10:33:55 -0500 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2011-03-09 19:38:36 -0500 |
commit | 76d500182061dcc7508e6b829af097348fa7d804 (patch) | |
tree | 3948584135d93937f668481acbcfab795efedbb5 /arch/arm/mach-omap2/sleep34xx.S | |
parent | f96bdfa0d036393741fce303ea98abb44452d042 (diff) |
ARM: omap3: Remove hand-encoded SMC instructions
For various reasons, Linux now only officially supports being built
with tools which are new enough to understand the SMC instruction.
Replacing the hand-encoded instructions when the mnemonic also
allows for correct assembly in Thumb-2 (otherwise, the result is
random data in the middle of the code).
The Makefile already ensures that this file is built with a high
enough gcc -march= flag (armv7-a).
Signed-off-by: Dave Martin <dave.martin@linaro.org>
Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: Jean Pihet <j-pihet@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/sleep34xx.S')
-rw-r--r-- | arch/arm/mach-omap2/sleep34xx.S | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/arm/mach-omap2/sleep34xx.S b/arch/arm/mach-omap2/sleep34xx.S index 98d8232808b8..a05c348885ac 100644 --- a/arch/arm/mach-omap2/sleep34xx.S +++ b/arch/arm/mach-omap2/sleep34xx.S | |||
@@ -133,7 +133,7 @@ ENTRY(save_secure_ram_context) | |||
133 | mov r6, #0xff | 133 | mov r6, #0xff |
134 | mcr p15, 0, r0, c7, c10, 4 @ data write barrier | 134 | mcr p15, 0, r0, c7, c10, 4 @ data write barrier |
135 | mcr p15, 0, r0, c7, c10, 5 @ data memory barrier | 135 | mcr p15, 0, r0, c7, c10, 5 @ data memory barrier |
136 | .word 0xE1600071 @ call SMI monitor (smi #1) | 136 | smc #1 @ call SMI monitor (smi #1) |
137 | nop | 137 | nop |
138 | nop | 138 | nop |
139 | nop | 139 | nop |
@@ -408,7 +408,7 @@ skipl2dis: | |||
408 | adr r3, l2_inv_api_params @ r3 points to dummy parameters | 408 | adr r3, l2_inv_api_params @ r3 points to dummy parameters |
409 | mcr p15, 0, r0, c7, c10, 4 @ data write barrier | 409 | mcr p15, 0, r0, c7, c10, 4 @ data write barrier |
410 | mcr p15, 0, r0, c7, c10, 5 @ data memory barrier | 410 | mcr p15, 0, r0, c7, c10, 5 @ data memory barrier |
411 | .word 0xE1600071 @ call SMI monitor (smi #1) | 411 | smc #1 @ call SMI monitor (smi #1) |
412 | /* Write to Aux control register to set some bits */ | 412 | /* Write to Aux control register to set some bits */ |
413 | mov r0, #42 @ set service ID for PPA | 413 | mov r0, #42 @ set service ID for PPA |
414 | mov r12, r0 @ copy secure Service ID in r12 | 414 | mov r12, r0 @ copy secure Service ID in r12 |
@@ -419,7 +419,7 @@ skipl2dis: | |||
419 | ldr r3, [r4, #0xBC] @ r3 points to parameters | 419 | ldr r3, [r4, #0xBC] @ r3 points to parameters |
420 | mcr p15, 0, r0, c7, c10, 4 @ data write barrier | 420 | mcr p15, 0, r0, c7, c10, 4 @ data write barrier |
421 | mcr p15, 0, r0, c7, c10, 5 @ data memory barrier | 421 | mcr p15, 0, r0, c7, c10, 5 @ data memory barrier |
422 | .word 0xE1600071 @ call SMI monitor (smi #1) | 422 | smc #1 @ call SMI monitor (smi #1) |
423 | 423 | ||
424 | #ifdef CONFIG_OMAP3_L2_AUX_SECURE_SAVE_RESTORE | 424 | #ifdef CONFIG_OMAP3_L2_AUX_SECURE_SAVE_RESTORE |
425 | /* Restore L2 aux control register */ | 425 | /* Restore L2 aux control register */ |
@@ -434,7 +434,7 @@ skipl2dis: | |||
434 | adds r3, r3, #8 @ r3 points to parameters | 434 | adds r3, r3, #8 @ r3 points to parameters |
435 | mcr p15, 0, r0, c7, c10, 4 @ data write barrier | 435 | mcr p15, 0, r0, c7, c10, 4 @ data write barrier |
436 | mcr p15, 0, r0, c7, c10, 5 @ data memory barrier | 436 | mcr p15, 0, r0, c7, c10, 5 @ data memory barrier |
437 | .word 0xE1600071 @ call SMI monitor (smi #1) | 437 | smc #1 @ call SMI monitor (smi #1) |
438 | #endif | 438 | #endif |
439 | b logic_l1_restore | 439 | b logic_l1_restore |
440 | 440 | ||
@@ -443,18 +443,18 @@ l2_inv_api_params: | |||
443 | l2_inv_gp: | 443 | l2_inv_gp: |
444 | /* Execute smi to invalidate L2 cache */ | 444 | /* Execute smi to invalidate L2 cache */ |
445 | mov r12, #0x1 @ set up to invalidate L2 | 445 | mov r12, #0x1 @ set up to invalidate L2 |
446 | .word 0xE1600070 @ Call SMI monitor (smieq) | 446 | smc #0 @ Call SMI monitor (smieq) |
447 | /* Write to Aux control register to set some bits */ | 447 | /* Write to Aux control register to set some bits */ |
448 | ldr r4, scratchpad_base | 448 | ldr r4, scratchpad_base |
449 | ldr r3, [r4,#0xBC] | 449 | ldr r3, [r4,#0xBC] |
450 | ldr r0, [r3,#4] | 450 | ldr r0, [r3,#4] |
451 | mov r12, #0x3 | 451 | mov r12, #0x3 |
452 | .word 0xE1600070 @ Call SMI monitor (smieq) | 452 | smc #0 @ Call SMI monitor (smieq) |
453 | ldr r4, scratchpad_base | 453 | ldr r4, scratchpad_base |
454 | ldr r3, [r4,#0xBC] | 454 | ldr r3, [r4,#0xBC] |
455 | ldr r0, [r3,#12] | 455 | ldr r0, [r3,#12] |
456 | mov r12, #0x2 | 456 | mov r12, #0x2 |
457 | .word 0xE1600070 @ Call SMI monitor (smieq) | 457 | smc #0 @ Call SMI monitor (smieq) |
458 | logic_l1_restore: | 458 | logic_l1_restore: |
459 | ldr r1, l2dis_3630 | 459 | ldr r1, l2dis_3630 |
460 | cmp r1, #0x1 @ Test if L2 re-enable needed on 3630 | 460 | cmp r1, #0x1 @ Test if L2 re-enable needed on 3630 |