From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by lists.ozlabs.org (Postfix) with ESMTP id 409YVH4vDTzF2Ch for ; Wed, 28 Mar 2018 01:36:22 +1100 (AEDT) Date: Tue, 27 Mar 2018 15:36:29 +0100 From: Will Deacon To: Sinan Kaya Cc: Arnd Bergmann , Benjamin Herrenschmidt , Jason Gunthorpe , David Laight , Oliver , "open list:LINUX FOR POWERPC (32-BIT AND 64-BIT)" , "linux-rdma@vger.kernel.org" , "Paul E. McKenney" , Peter Zijlstra , Ingo Molnar , Jonathan Corbet Subject: Re: RFC on writel and writel_relaxed Message-ID: <20180327143628.GA10642@arm.com> References: <1522101717.7364.14.camel@kernel.crashing.org> <20180326222756.GJ15554@ziepe.ca> <1522141019.7364.43.camel@kernel.crashing.org> <20180327095745.GB29373@arm.com> <20180327100944.GD29373@arm.com> <20180327110258.GF2464@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, Mar 27, 2018 at 09:46:51AM -0400, Sinan Kaya wrote: > On 3/27/2018 7:02 AM, Will Deacon wrote: > > - See Documentation/DMA-API.txt for more information on consistent memory. > > + can see it now has ownership. Note that, when using writel(), a prior > > + wmb() is not needed to guarantee that the cache coherent memory writes > > + have completed before writing to the MMIO region. The cheaper > > + writel_relaxed() does not provide this guarantee and must not be used > > + here. > > Can we say the same thing for iowrite32() and iowrite32be(). I also see wmb() > in front of these. I don't think so. My reading of memory-barriers.txt says that writeX might expand to outX, and outX is not ordered with respect to other types of memory. Will