]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 8475/1: SWP emulation: Restore original *data when failed
authorShengjiu Wang <shengjiu.wang@freescale.com>
Tue, 8 Dec 2015 12:37:19 +0000 (13:37 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 15 Dec 2015 11:51:42 +0000 (11:51 +0000)
commitcc12de4d679b941588d685e1a7f2bc047bfa96de
tree5d8fbefb9caa76e73a8077217242883dd74a6945
parentb1eb8723ec63d2cb712b1bd6fea23143af2d513f
ARM: 8475/1: SWP emulation: Restore original *data when failed

__user_swpX_asm maybe failed in first STREX operation, emulate_swpX
will try again, but the *data has been changed in first time. which
causes the result is wrong.
This patch is to fix this issue. When STREX succeed, change the *data.
if it fail, *data is not changed.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/swp_emulate.c