From patchwork Thu Sep 25 09:33:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 37909 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 82ADE20560 for ; Thu, 25 Sep 2014 09:34:23 +0000 (UTC) Received: by mail-wg0-f72.google.com with SMTP id k14sf2626616wgh.3 for ; Thu, 25 Sep 2014 02:34:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:cc:subject:message-id :references:mime-version:in-reply-to:user-agent:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe :content-type:content-disposition; bh=M4/P7XZ72SIK0KJ85g22wNqTStPNWvVr+dvcoMlVlhE=; b=BxDKB69DDKtr0Vu8GPYZntIpnqVKfLAoKgk83IfVJpCixRj/FIJPCitJkeQgtudyOW T0vNDGsCIywjWmAF/Yrp3nqbqnOu5NPmXaNnn7tGwd3g5afOlsdzK9ssUGdoGCn6Tw9D inPik3xLvvcVEnGwayljJ+EhKLLLwwOnx7km9ylyuskAzLo2+PrR0+A5h1lz/tLMgyT8 E0Di66ytOF0oSjadHXC7OEvhhwlRu7U97Mt+Un1QAsve9juVC078SQFaJIFF4DgJh80o pMjdcQz+YMG3is9Si3IdCereL4zyWgCMQ89bD9UhZQjSep9DSoexcNYlAlY22el9BaG2 QySw== X-Gm-Message-State: ALoCoQlXFajRUEQ4qHqJSQdGTuzxFRuB1mGpjoypUY2ozwe2bFjGbHCKKc04nOMRpV2S5NWvy3K7 X-Received: by 10.112.131.33 with SMTP id oj1mr1916009lbb.7.1411637662697; Thu, 25 Sep 2014 02:34:22 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.4.43 with SMTP id cb11ls261817lad.23.gmail; Thu, 25 Sep 2014 02:34:22 -0700 (PDT) X-Received: by 10.112.76.6 with SMTP id g6mr11539159lbw.22.1411637662252; Thu, 25 Sep 2014 02:34:22 -0700 (PDT) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com [209.85.215.52]) by mx.google.com with ESMTPS id pg10si2104111lbb.127.2014.09.25.02.34.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 25 Sep 2014 02:34:22 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by mail-la0-f52.google.com with SMTP id gq15so12126040lab.39 for ; Thu, 25 Sep 2014 02:34:22 -0700 (PDT) X-Received: by 10.152.7.8 with SMTP id f8mr11857960laa.27.1411637661886; Thu, 25 Sep 2014 02:34:21 -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.112.130.169 with SMTP id of9csp719403lbb; Thu, 25 Sep 2014 02:34:21 -0700 (PDT) X-Received: by 10.70.131.199 with SMTP id oo7mr23263032pdb.95.1411637660209; Thu, 25 Sep 2014 02:34:20 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gj11si2821765pbd.46.2014.09.25.02.34.19 for ; Thu, 25 Sep 2014 02:34:20 -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 S1753040AbaIYJeO (ORCPT + 27 others); Thu, 25 Sep 2014 05:34:14 -0400 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:55982 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751985AbaIYJeL (ORCPT ); Thu, 25 Sep 2014 05:34:11 -0400 Received: from arm.com (edgewater-inn.cambridge.arm.com [10.1.203.204]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id s8P9X1wo010475; Thu, 25 Sep 2014 10:33:02 +0100 (BST) Date: Thu, 25 Sep 2014 10:33:09 +0100 From: Will Deacon To: Greg Ungerer Cc: "linux-arch@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "arnd@arndb.de" , "benh@kernel.crashing.org" , "chris@zankel.net" , "cmetcalf@tilera.com" , "davem@davemloft.net" , "deller@gmx.de" , "dhowells@redhat.com" , "geert@linux-m68k.org" , "heiko.carstens@de.ibm.com" , "hpa@zytor.com" , "jcmvbkbc@gmail.com" , "jesper.nilsson@axis.com" , "mingo@redhat.com" , "monstr@monstr.eu" , "paulmck@linux.vnet.ibm.com" , "rdunlap@infradead.org" , "sam@ravnborg.org" , "schwidefsky@de.ibm.com" , "starvik@axis.com" , "takata@linux-m32r.org" , "tglx@linutronix.de" , "tony.luck@intel.com" , "daniel.thompson@linaro.org" , "broonie@linaro.org" , "linux@arm.linux.org.uk" Subject: Re: [PATCH v3 09/17] m68k: io: implement dummy relaxed accessor macros for writes Message-ID: <20140925093309.GG20043@arm.com> References: <1411579056-16966-1-git-send-email-will.deacon@arm.com> <1411579056-16966-10-git-send-email-will.deacon@arm.com> <54236A67.90001@uclinux.org> MIME-Version: 1.0 In-Reply-To: <54236A67.90001@uclinux.org> User-Agent: Mutt/1.5.23 (2014-03-12) 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.215.52 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: , Content-Disposition: inline On Thu, Sep 25, 2014 at 02:05:43AM +0100, Greg Ungerer wrote: > Hi Will Hi Greg, Thanks for taking a look. > On 25/09/14 03:17, Will Deacon wrote: > > 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) > > Putting them here means they won't have any multiple include protection > (there is no "#ifndef _IO_H" around them). Doesn't seem to lead to > any problems in practice. Just flagging it... That's easy enough to fix, and actually, we should have __KERNEL__ checks here too. Fixup below. Will --->8 --- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/arch/m68k/include/asm/io.h b/arch/m68k/include/asm/io.h index bccd5a914eb6..ded201916560 100644 --- a/arch/m68k/include/asm/io.h +++ b/arch/m68k/include/asm/io.h @@ -1,9 +1,14 @@ +#ifndef _M68K_IO_H +#define _M68K_IO_H + #ifdef __uClinux__ #include #else #include #endif +#ifdef __KERNEL__ + #define readb_relaxed(addr) readb(addr) #define readw_relaxed(addr) readw(addr) #define readl_relaxed(addr) readl(addr) @@ -11,3 +16,6 @@ #define writeb_relaxed(b, addr) writeb(b, addr) #define writew_relaxed(b, addr) writew(b, addr) #define writel_relaxed(b, addr) writel(b, addr) + +#endif /* __KERNEL__ */ +#endif /* _M68K_IO_H */