summaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/local.h
diff options
context:
space:
mode:
authorDeng-Cheng Zhu <dengcheng.zhu@gmail.com>2010-10-12 19:37:20 +0800
committerRalf Baechle <ralf@linux-mips.org>2010-10-29 19:08:47 +0100
commit6dbd972850c092e50e10bd14a3324e2abe88997a (patch)
tree99445160e479bdab166672d9cd120c0dc7634f0a /arch/mips/include/asm/local.h
parent238dd317f74250983aefbde6dc0a1f345a717993 (diff)
downloadblackbird-obmc-linux-6dbd972850c092e50e10bd14a3324e2abe88997a.tar.gz
blackbird-obmc-linux-6dbd972850c092e50e10bd14a3324e2abe88997a.zip
MIPS: define local_xchg from xchg_local to atomic_long_xchg
Perf-events is now using local_t helper functions internally. There is a use of local_xchg(). On MIPS, this is defined to xchg_local() which is missing in asm/system.h. This patch re-defines local_xchg() in asm/local.h to atomic_long_xchg(). Then Perf-events can pass the build. Signed-off-by: Deng-Cheng Zhu <dengcheng.zhu@gmail.com> To: linux-mips@linux-mips.org Cc: a.p.zijlstra@chello.nl Cc: paulus@samba.org Cc: mingo@elte.hu Cc: acme@redhat.com Cc: jamie.iles@picochip.com Cc: ddaney@caviumnetworks.com Cc: matt@console-pimps.org Patchwork: https://patchwork.linux-mips.org/patch/1687/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/local.h')
-rw-r--r--arch/mips/include/asm/local.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/include/asm/local.h b/arch/mips/include/asm/local.h
index bdcdef02d147..fffc8307a80a 100644
--- a/arch/mips/include/asm/local.h
+++ b/arch/mips/include/asm/local.h
@@ -117,7 +117,7 @@ static __inline__ long local_sub_return(long i, local_t * l)
#define local_cmpxchg(l, o, n) \
((long)cmpxchg_local(&((l)->a.counter), (o), (n)))
-#define local_xchg(l, n) (xchg_local(&((l)->a.counter), (n)))
+#define local_xchg(l, n) (atomic_long_xchg((&(l)->a), (n)))
/**
* local_add_unless - add unless the number is a given value
OpenPOWER on IntegriCloud