All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 072/115] frv: cmpxchg: implement cmpxchg64()
@ 2017-07-10 22:50 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2017-07-10 22:50 UTC (permalink / raw)
  To: akpm, dhowells, fengguang.wu, joro, mingo, mm-commits, peterz,
	robin.murphy, torvalds, will.deacon

From: Will Deacon <will.deacon@arm.com>
Subject: frv: cmpxchg: implement cmpxchg64()

FRV supports 64-bit cmpxchg, which is provided by the arch code as
__cmpxchg_64 and subsequently used to implement atomic64_cmpxchg.

This patch hooks up the generic cmpxchg64 API using the same function,
which also provides default definitions of the relaxed, acquire and
release variants.  This fixes the build when COMPILE_TEST=y and
IOMMU_IO_PGTABLE_LPAE=y.

Link: http://lkml.kernel.org/r/1499084670-6996-1-git-send-email-will.deacon@arm.com
Signed-off-by: Will Deacon <will.deacon@arm.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 arch/frv/include/asm/cmpxchg.h |    1 +
 1 file changed, 1 insertion(+)

diff -puN arch/frv/include/asm/cmpxchg.h~frv-cmpxchg-implement-cmpxchg64 arch/frv/include/asm/cmpxchg.h
--- a/arch/frv/include/asm/cmpxchg.h~frv-cmpxchg-implement-cmpxchg64
+++ a/arch/frv/include/asm/cmpxchg.h
@@ -76,6 +76,7 @@ extern uint32_t __xchg_32(uint32_t i, vo
  * - if (*ptr != test) then orig = *ptr;
  */
 extern uint64_t __cmpxchg_64(uint64_t test, uint64_t new, volatile uint64_t *v);
+#define cmpxchg64(p, o, n)	__cmpxchg_64((o), (n), (p))
 
 #ifndef CONFIG_FRV_OUTOFLINE_ATOMIC_OPS
 
_

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-07-10 22:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-10 22:50 [patch 072/115] frv: cmpxchg: implement cmpxchg64() akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.