diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2010-03-29 11:29:46 +0200 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-03-29 18:33:33 +0200 |
commit | fd522a8dec11a08b5fdd23982193808e268be19e (patch) | |
tree | 0eb958250db72b19ff2e9da63c432e19be0122bb /arch/arm/lib | |
parent | ARM: 6005/1: arm: kprobes: fix register corruption with jprobes (diff) | |
download | linux-fd522a8dec11a08b5fdd23982193808e268be19e.tar.xz linux-fd522a8dec11a08b5fdd23982193808e268be19e.zip |
ARM: 6006/1: ARM: Use the correct NOP size in memmove for Thumb-2 kernel builds
When compiling the kernel to Thumb-2, using a 16-bit NOP in the
memmove() implementation causes the preceding ADD PC instruction to
branch incorrectly in the middle of a 32-bit LDR or STR instruction. The
memmove() code is now similar to the memcpy() template.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/lib')
-rw-r--r-- | arch/arm/lib/memmove.S | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/lib/memmove.S b/arch/arm/lib/memmove.S index 5025c863713d..938fc14f962d 100644 --- a/arch/arm/lib/memmove.S +++ b/arch/arm/lib/memmove.S @@ -74,7 +74,7 @@ ENTRY(memmove) rsb ip, ip, #32 addne pc, pc, ip @ C is always clear here b 7f -6: nop +6: W(nop) W(ldr) r3, [r1, #-4]! W(ldr) r4, [r1, #-4]! W(ldr) r5, [r1, #-4]! @@ -85,7 +85,7 @@ ENTRY(memmove) add pc, pc, ip nop - nop + W(nop) W(str) r3, [r0, #-4]! W(str) r4, [r0, #-4]! W(str) r5, [r0, #-4]! |