linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: SWP emulation: Restore original *data when failed
@ 2015-10-14  2:51 Shengjiu Wang
  2015-10-15  8:24 ` Russell King - ARM Linux
  0 siblings, 1 reply; 11+ messages in thread
From: Shengjiu Wang @ 2015-10-14  2:51 UTC (permalink / raw)
  To: linux-arm-kernel

__user_swpX_asm maybe failed in first STREX operation, emulate_swpX
will try again, but the *data has been changed in first time. which
cause the result is wrong. So need to recover the *data when failed.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
---
 arch/arm/kernel/swp_emulate.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/kernel/swp_emulate.c b/arch/arm/kernel/swp_emulate.c
index 5b26e7e..c61fbf92 100644
--- a/arch/arm/kernel/swp_emulate.c
+++ b/arch/arm/kernel/swp_emulate.c
@@ -41,6 +41,7 @@
 	"1:	strex"B"	%0, %2, [%3]\n"			\
 	"	cmp		%0, #0\n"			\
 	"	movne		%0, %4\n"			\
+	"	movne		%1, %2\n"			\
 	"2:\n"							\
 	"	.section	 .text.fixup,\"ax\"\n"		\
 	"	.align		2\n"				\
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-10-28 16:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-14  2:51 [PATCH] ARM: SWP emulation: Restore original *data when failed Shengjiu Wang
2015-10-15  8:24 ` Russell King - ARM Linux
2015-10-15  8:36   ` Shengjiu Wang
2015-10-15  8:57     ` Russell King - ARM Linux
2015-10-15  9:17       ` Vladimir Murzin
2015-10-15 13:02         ` Will Deacon
2015-10-15 13:25           ` Vladimir Murzin
2015-10-16  7:52             ` Vladimir Murzin
2015-10-16 10:37               ` Catalin Marinas
2015-10-27 15:44                 ` Will Deacon
2015-10-28 16:16                   ` Will Deacon

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).