From: akpm@linux-foundation.org Subject: [patch 072/115] frv: cmpxchg: implement cmpxchg64() Date: Mon, 10 Jul 2017 15:50:49 -0700 Message-ID: <20170710225049.trPrbyD6U%akpm@linux-foundation.org> Reply-To: linux-kernel@vger.kernel.org Return-path: Received: from mail.linuxfoundation.org ([140.211.169.12]:43160 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754963AbdGJWuu (ORCPT ); Mon, 10 Jul 2017 18:50:50 -0400 Sender: mm-commits-owner@vger.kernel.org List-Id: mm-commits@vger.kernel.org To: akpm@linux-foundation.org, dhowells@redhat.com, fengguang.wu@intel.com, joro@8bytes.org, mingo@kernel.org, mm-commits@vger.kernel.org, peterz@infradead.org, robin.murphy@arm.com, torvalds@linux-foundation.org, will.deacon@arm.com From: Will Deacon 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 Reported-by: kbuild test robot Cc: Joerg Roedel Cc: Robin Murphy Cc: Peter Zijlstra Cc: Ingo Molnar Cc: David Howells Signed-off-by: Andrew Morton --- 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 _