* [PATCH] ARM: Use the correct NOP size in memmove for Thumb-2 kernel builds
@ 2010-03-26 11:11 Catalin Marinas
2010-03-28 21:52 ` Russell King - ARM Linux
0 siblings, 1 reply; 2+ messages in thread
From: Catalin Marinas @ 2010-03-26 11:11 UTC (permalink / raw)
To: linux-arm-kernel
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 no similar to the memcpy() template.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
---
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 5025c86..938fc14 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]!
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] ARM: Use the correct NOP size in memmove for Thumb-2 kernel builds
2010-03-26 11:11 [PATCH] ARM: Use the correct NOP size in memmove for Thumb-2 kernel builds Catalin Marinas
@ 2010-03-28 21:52 ` Russell King - ARM Linux
0 siblings, 0 replies; 2+ messages in thread
From: Russell King - ARM Linux @ 2010-03-28 21:52 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Mar 26, 2010 at 11:11:22AM +0000, Catalin Marinas wrote:
> 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 no similar to the memcpy() template.
Ok.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-03-28 21:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-26 11:11 [PATCH] ARM: Use the correct NOP size in memmove for Thumb-2 kernel builds Catalin Marinas
2010-03-28 21:52 ` Russell King - ARM Linux
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).