From patchwork Mon Jul 3 12:24:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 106897 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp5706245qge; Mon, 3 Jul 2017 05:24:37 -0700 (PDT) X-Received: by 10.98.133.211 with SMTP id m80mr9779552pfk.164.1499084677534; Mon, 03 Jul 2017 05:24:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499084677; cv=none; d=google.com; s=arc-20160816; b=w3JxdUPZ3qLwH+VZ4q9gUgPh9vbElRJvYucjQVrIhxmWp1FjaR5VrpvywXiBrsMSBc zYQxmgKmtkyqkAsUzitP8LtfBeU8PKB+xHwiJ9rn0zrC2M6iItRfJLaH+Ue7+FyCXSAv Xl+OQt5A0ZynriDF3uEQZLyK59krabvZBqLsfx1+s6wWbKG+3rdRKtekj2xRkYW0vvXq j23IuDQkgf2MiqDZv8ZuP+K9WcxPEDAp8t4j+Lbn0Yk2K4HKv14AvLOgLX+f2KKh1RAD Lc2KWKwsbLCiYrE8E4k4O+kBsjNNijWQX538WWcURuKPEeUhob5WuVODemEBy7H9mE4z jD0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=1i+VRyeFT/t5DDm+trsa1YCVkReAl3hu5S4n/+0eZyA=; b=JCQSzwj8JxuO9FD4U5W29b5ZlCZAuBX6AmIzl/8qBW0wIpySJIBry1kPMqAcYSFeq1 LbR8SOiEWIk5zQZ0iQg0rtiuPu73VWfeleXgS3XPr5gkBsJ83EqkiNFv3p5kyBkXMGGL 4nyvnLAgvN0Ask5xKGTuok3G9Lpk0y5cMy6/FENKZoDp4qfvr1lW8USX+LtGN4dWHM1n cro/bewTlab6+ccgFkY3kYoO8wOAc3d7EkTSyw84zgTCflLb+gy3fN6ftNy0AgoH0fZa sYQY0eRmlJdQVwDJjmRgC8VxRsH4iRiQYhEVKqlZc8fuc/nTHXj6jJRE1S26duJr2kZj 663g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d1si11011595pga.474.2017.07.03.05.24.37; Mon, 03 Jul 2017 05:24:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753379AbdGCMYe (ORCPT + 25 others); 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 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 15948344; Mon, 3 Jul 2017 05:24:32 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id DC0C53F41F; Mon, 3 Jul 2017 05:24:31 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 366871AE0458; Mon, 3 Jul 2017 13:24:31 +0100 (BST) 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 Precedence: bulk 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(+) -- 2.1.4 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