diff options
Diffstat (limited to 'arch/mips/include/asm/futex.h')
-rw-r--r-- | arch/mips/include/asm/futex.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/mips/include/asm/futex.h b/arch/mips/include/asm/futex.h index c14d798f3888..b83b0397462d 100644 --- a/arch/mips/include/asm/futex.h +++ b/arch/mips/include/asm/futex.h | |||
@@ -50,6 +50,7 @@ | |||
50 | "i" (-EFAULT) \ | 50 | "i" (-EFAULT) \ |
51 | : "memory"); \ | 51 | : "memory"); \ |
52 | } else if (cpu_has_llsc) { \ | 52 | } else if (cpu_has_llsc) { \ |
53 | loongson_llsc_mb(); \ | ||
53 | __asm__ __volatile__( \ | 54 | __asm__ __volatile__( \ |
54 | " .set push \n" \ | 55 | " .set push \n" \ |
55 | " .set noat \n" \ | 56 | " .set noat \n" \ |
@@ -163,6 +164,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, | |||
163 | "i" (-EFAULT) | 164 | "i" (-EFAULT) |
164 | : "memory"); | 165 | : "memory"); |
165 | } else if (cpu_has_llsc) { | 166 | } else if (cpu_has_llsc) { |
167 | loongson_llsc_mb(); | ||
166 | __asm__ __volatile__( | 168 | __asm__ __volatile__( |
167 | "# futex_atomic_cmpxchg_inatomic \n" | 169 | "# futex_atomic_cmpxchg_inatomic \n" |
168 | " .set push \n" | 170 | " .set push \n" |
@@ -192,6 +194,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, | |||
192 | : GCC_OFF_SMALL_ASM() (*uaddr), "Jr" (oldval), "Jr" (newval), | 194 | : GCC_OFF_SMALL_ASM() (*uaddr), "Jr" (oldval), "Jr" (newval), |
193 | "i" (-EFAULT) | 195 | "i" (-EFAULT) |
194 | : "memory"); | 196 | : "memory"); |
197 | loongson_llsc_mb(); | ||
195 | } else | 198 | } else |
196 | return -ENOSYS; | 199 | return -ENOSYS; |
197 | 200 | ||