summaryrefslogtreecommitdiffstats
path: root/arch/sparc/include/asm/cmpxchg_32.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-05-13 13:07:16 -0700
committerDavid S. Miller <davem@davemloft.net>2012-05-13 13:07:16 -0700
commit73c1377da9fb732bf8ff1b262a92507e8736b1bf (patch)
treefb978e875640b2959f32bb5cdbcaa5335bce9642 /arch/sparc/include/asm/cmpxchg_32.h
parent0f031b3f26c5fc019d541e41ae53b32e2dc6a373 (diff)
downloadblackbird-op-linux-73c1377da9fb732bf8ff1b262a92507e8736b1bf.tar.gz
blackbird-op-linux-73c1377da9fb732bf8ff1b262a92507e8736b1bf.zip
sparc32: Kill btfixup for xchg()'s 'swap' instruction.
We always have this instruction available, so no need to use btfixup for it any more. This also eradicates the whole of atomic_32.S and thus the __atomic_begin and __atomic_end symbols completely. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include/asm/cmpxchg_32.h')
-rw-r--r--arch/sparc/include/asm/cmpxchg_32.h25
1 files changed, 0 insertions, 25 deletions
diff --git a/arch/sparc/include/asm/cmpxchg_32.h b/arch/sparc/include/asm/cmpxchg_32.h
index c786b0a92b51..78ac549f7355 100644
--- a/arch/sparc/include/asm/cmpxchg_32.h
+++ b/arch/sparc/include/asm/cmpxchg_32.h
@@ -13,38 +13,13 @@
#include <asm/btfixup.h>
-/* This has special calling conventions */
-#ifndef CONFIG_SMP
-BTFIXUPDEF_CALL(void, ___xchg32, void)
-#endif
-
static inline unsigned long xchg_u32(__volatile__ unsigned long *m, unsigned long val)
{
-#ifdef CONFIG_SMP
__asm__ __volatile__("swap [%2], %0"
: "=&r" (val)
: "0" (val), "r" (m)
: "memory");
return val;
-#else
- register unsigned long *ptr asm("g1");
- register unsigned long ret asm("g2");
-
- ptr = (unsigned long *) m;
- ret = val;
-
- /* Note: this is magic and the nop there is
- really needed. */
- __asm__ __volatile__(
- "mov %%o7, %%g4\n\t"
- "call ___f____xchg32\n\t"
- " nop\n\t"
- : "=&r" (ret)
- : "0" (ret), "r" (ptr)
- : "g3", "g4", "g7", "memory", "cc");
-
- return ret;
-#endif
}
extern void __xchg_called_with_bad_pointer(void);
OpenPOWER on IntegriCloud