From patchwork Thu May 22 16:47:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 30644 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f70.google.com (mail-pa0-f70.google.com [209.85.220.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A7B3B20671 for ; Thu, 22 May 2014 16:52:07 +0000 (UTC) Received: by mail-pa0-f70.google.com with SMTP id lj1sf11888355pab.1 for ; Thu, 22 May 2014 09:52:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=Gn084Dy4nhG47Y/eSO8nFr+6bzpyb/Wzn2CVof35La8=; b=KlW8+13F+wRfj2WjvH6WA8Thi0Qp8nGrOYEaqozHIn8G3ma5tpuQDUWUBNuPfJBO/z oDfKFa89+B0GSF9gsZY/mFm3apF4q0bt034bU5n5Qpaz4IpCWjec8Vb8FyVmZvQGAoVC xQT/e3kUPxUxPSOyHwcSxIHOL1bZqpnFzeNeCxvGSoru2ZIWZBzCq5em0/lgflwFj1sW cgqFTs2JKPE4zDC/p0K6PDY3yqrEKgrwhuh6oH4QwrqSxuFYkdDqiQuzB+QnjwiHvFzN HYVXttsTnwC8OzodfYnUKwrdaTsivnd7mz8PQHEtGExYsxUmf2cGzr5N3EX715sSRX0H cD2w== X-Gm-Message-State: ALoCoQnjvgYEr1WaLuipAj1zMLIF4oH5kUCtg1hTowQxU4ACg4KEZG+LrbBKQXUc2P4Ripz9aEdI X-Received: by 10.66.145.33 with SMTP id sr1mr3931898pab.18.1400777526538; Thu, 22 May 2014 09:52:06 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.94.145 with SMTP id g17ls1336514qge.76.gmail; Thu, 22 May 2014 09:52:06 -0700 (PDT) X-Received: by 10.58.85.3 with SMTP id d3mr3268625vez.34.1400777526374; Thu, 22 May 2014 09:52:06 -0700 (PDT) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx.google.com with ESMTPS id so6si200669vdb.76.2014.05.22.09.52.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 22 May 2014 09:52:06 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.180 as permitted sender) client-ip=209.85.128.180; Received: by mail-ve0-f180.google.com with SMTP id db12so4689569veb.25 for ; Thu, 22 May 2014 09:52:06 -0700 (PDT) X-Received: by 10.52.184.164 with SMTP id ev4mr11489667vdc.15.1400777526292; Thu, 22 May 2014 09:52:06 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp215322vcb; Thu, 22 May 2014 09:52:05 -0700 (PDT) X-Received: by 10.66.120.201 with SMTP id le9mr56667854pab.98.1400777525484; Thu, 22 May 2014 09:52:05 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id lu5si424793pab.154.2014.05.22.09.52.04; Thu, 22 May 2014 09:52:04 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753252AbaEVQvz (ORCPT + 27 others); Thu, 22 May 2014 12:51:55 -0400 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:48895 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751825AbaEVQsY (ORCPT ); Thu, 22 May 2014 12:48:24 -0400 Received: from edgewater-inn.cambridge.arm.com (edgewater-inn.cambridge.arm.com [10.1.203.25]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id s4MGlZwo028191; Thu, 22 May 2014 17:47:35 +0100 (BST) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id C074B1AE3411; Thu, 22 May 2014 17:47:34 +0100 (BST) From: Will Deacon To: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Cc: arnd@arndb.de, monstr@monstr.eu, dhowells@redhat.com, broonie@linaro.org, benh@kernel.crashing.org, peterz@infradead.org, paulmck@linux.vnet.ibm.com, Will Deacon Subject: [PATCH v2 10/18] m68k: io: implement dummy relaxed accessor macros for writes Date: Thu, 22 May 2014 17:47:22 +0100 Message-Id: <1400777250-17335-11-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 1.9.2 In-Reply-To: <1400777250-17335-1-git-send-email-will.deacon@arm.com> References: <1400777250-17335-1-git-send-email-will.deacon@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: will.deacon@arm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.180 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , write{b,w,l}_relaxed are implemented by some architectures in order to permit memory-mapped I/O accesses with weaker barrier semantics than the non-relaxed variants. This patch adds dummy macros for the write accessors to m68k, in the same vein as the dummy definitions for the relaxed read accessors. Additionally, the existing relaxed read accessors are moved into asm/io.h, so that they can be used by m68k targets with an MMU. Acked-by: Geert Uytterhoeven Signed-off-by: Will Deacon --- arch/m68k/include/asm/io.h | 8 ++++++++ arch/m68k/include/asm/io_no.h | 4 ---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/m68k/include/asm/io.h b/arch/m68k/include/asm/io.h index c70cc9155003..bccd5a914eb6 100644 --- a/arch/m68k/include/asm/io.h +++ b/arch/m68k/include/asm/io.h @@ -3,3 +3,11 @@ #else #include #endif + +#define readb_relaxed(addr) readb(addr) +#define readw_relaxed(addr) readw(addr) +#define readl_relaxed(addr) readl(addr) + +#define writeb_relaxed(b, addr) writeb(b, addr) +#define writew_relaxed(b, addr) writew(b, addr) +#define writel_relaxed(b, addr) writel(b, addr) diff --git a/arch/m68k/include/asm/io_no.h b/arch/m68k/include/asm/io_no.h index 52f7e8499172..19c237c63dc2 100644 --- a/arch/m68k/include/asm/io_no.h +++ b/arch/m68k/include/asm/io_no.h @@ -40,10 +40,6 @@ static inline unsigned int _swapl(volatile unsigned long v) #define readl(addr) \ ({ unsigned int __v = (*(volatile unsigned int *) (addr)); __v; }) -#define readb_relaxed(addr) readb(addr) -#define readw_relaxed(addr) readw(addr) -#define readl_relaxed(addr) readl(addr) - #define writeb(b,addr) (void)((*(volatile unsigned char *) (addr)) = (b)) #define writew(b,addr) (void)((*(volatile unsigned short *) (addr)) = (b)) #define writel(b,addr) (void)((*(volatile unsigned int *) (addr)) = (b))