Commit 0ca2b776 authored by Linus Torvalds's avatar Linus Torvalds

Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Fix futex_atomic_cmpxchg_inatomic implementation.
parents aefba081 c7fed9d7
...@@ -87,24 +87,22 @@ static inline int ...@@ -87,24 +87,22 @@ static inline int
futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
{ {
__asm__ __volatile__( __asm__ __volatile__(
"\n1: lduwa [%2] %%asi, %0\n" "\n1: casa [%3] %%asi, %2, %0\n"
"2: casa [%2] %%asi, %0, %1\n" "2:\n"
"3:\n"
" .section .fixup,#alloc,#execinstr\n" " .section .fixup,#alloc,#execinstr\n"
" .align 4\n" " .align 4\n"
"4: ba 3b\n" "3: ba 2b\n"
" mov %3, %0\n" " mov %4, %0\n"
" .previous\n" " .previous\n"
" .section __ex_table,\"a\"\n" " .section __ex_table,\"a\"\n"
" .align 4\n" " .align 4\n"
" .word 1b, 4b\n" " .word 1b, 3b\n"
" .word 2b, 4b\n"
" .previous\n" " .previous\n"
: "=&r" (oldval) : "=r" (newval)
: "r" (newval), "r" (uaddr), "i" (-EFAULT) : "0" (newval), "r" (oldval), "r" (uaddr), "i" (-EFAULT)
: "memory"); : "memory");
return oldval; return newval;
} }
#endif /* !(_SPARC64_FUTEX_H) */ #endif /* !(_SPARC64_FUTEX_H) */
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