Commit f6a12a7d authored by Meyer, Kirk's avatar Meyer, Kirk Committed by Michal Simek

microblaze: Reversed logic in futex cmpxchg

futex_atomic_cmpxchg_inatomic exchanged if the values were
unequal rather than equal. This caused incorrect behavior
of robust futexes.
Signed-off-by: default avatarKirk Meyer <kirk.meyer@sencore.com>
Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
parent b5dd0bb4
...@@ -105,7 +105,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, ...@@ -105,7 +105,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
__asm__ __volatile__ ("1: lwx %1, %3, r0; \ __asm__ __volatile__ ("1: lwx %1, %3, r0; \
cmp %2, %1, %4; \ cmp %2, %1, %4; \
beqi %2, 3f; \ bnei %2, 3f; \
2: swx %5, %3, r0; \ 2: swx %5, %3, r0; \
addic %2, r0, 0; \ addic %2, r0, 0; \
bnei %2, 1b; \ bnei %2, 1b; \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment