diff options
author | Victor Kamensky <victor.kamensky@linaro.org> | 2013-11-07 02:42:42 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-11-14 06:13:09 -0500 |
commit | d9a790df8e984b143e71ca429316064adaecf65c (patch) | |
tree | 67c2649eb8230cc4b1b064e64fb5701554db508a /arch/arm | |
parent | 139cc2ba7400dab80228a2bfa683e2f49cf5d3ff (diff) |
ARM: 7883/1: fix mov to mvn conversion in case of 64 bit phys_addr_t and BE
Fix patching code to convert mov instruction into mvn instruction
in case of CONFIG_ARCH_PHYS_ADDR_T_64BIT and CONFIG_ARM_PATCH_PHYS_VIRT.
In BE case store into r0 proper bits so byte swapped instruction
could be modified correctly.
Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
Reviewed-by: R Sricharan <r.sricharan@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/kernel/head.S | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index cd788d5b6682..11d59b32fb8d 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -645,7 +645,11 @@ ARM_BE8(rev16 ip, ip) | |||
645 | bcc 1b | 645 | bcc 1b |
646 | bx lr | 646 | bx lr |
647 | #else | 647 | #else |
648 | #ifdef CONFIG_CPU_ENDIAN_BE8 | ||
649 | moveq r0, #0x00004000 @ set bit 22, mov to mvn instruction | ||
650 | #else | ||
648 | moveq r0, #0x400000 @ set bit 22, mov to mvn instruction | 651 | moveq r0, #0x400000 @ set bit 22, mov to mvn instruction |
652 | #endif | ||
649 | b 2f | 653 | b 2f |
650 | 1: ldr ip, [r7, r3] | 654 | 1: ldr ip, [r7, r3] |
651 | #ifdef CONFIG_CPU_ENDIAN_BE8 | 655 | #ifdef CONFIG_CPU_ENDIAN_BE8 |
@@ -654,7 +658,7 @@ ARM_BE8(rev16 ip, ip) | |||
654 | tst ip, #0x000f0000 @ check the rotation field | 658 | tst ip, #0x000f0000 @ check the rotation field |
655 | orrne ip, ip, r6, lsl #24 @ mask in offset bits 31-24 | 659 | orrne ip, ip, r6, lsl #24 @ mask in offset bits 31-24 |
656 | biceq ip, ip, #0x00004000 @ clear bit 22 | 660 | biceq ip, ip, #0x00004000 @ clear bit 22 |
657 | orreq ip, ip, r0, lsl #24 @ mask in offset bits 7-0 | 661 | orreq ip, ip, r0 @ mask in offset bits 7-0 |
658 | #else | 662 | #else |
659 | bic ip, ip, #0x000000ff | 663 | bic ip, ip, #0x000000ff |
660 | tst ip, #0xf00 @ check the rotation field | 664 | tst ip, #0xf00 @ check the rotation field |