From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753377AbdGCMYe (ORCPT ); Mon, 3 Jul 2017 08:24:34 -0400 Received: from foss.arm.com ([217.140.101.70]:33204 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752620AbdGCMYc (ORCPT ); Mon, 3 Jul 2017 08:24:32 -0400 From: Will Deacon To: linux-kernel@vger.kernel.org Cc: iommu@lists.linux-foundation.org, Will Deacon , Joerg Roedel , Robin Murphy , Peter Zijlstra , Ingo Molnar , Andrew Morton Subject: [PATCH] frv: cmpxchg: Implement cmpxchg64 Date: Mon, 3 Jul 2017 13:24:30 +0100 Message-Id: <1499084670-6996-1-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Cc: Joerg Roedel Cc: Robin Murphy Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Andrew Morton Reported-by: kbuild test robot Signed-off-by: Will Deacon --- FRV is orphaned, so not sure where to send this. arch/frv/include/asm/cmpxchg.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/frv/include/asm/cmpxchg.h b/arch/frv/include/asm/cmpxchg.h index a899765102ea..ad1f11cfa92a 100644 --- a/arch/frv/include/asm/cmpxchg.h +++ b/arch/frv/include/asm/cmpxchg.h @@ -76,6 +76,7 @@ extern uint32_t __xchg_32(uint32_t i, volatile void *v); * - 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 -- 2.1.4