From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Subject: Re: RFC on writel and writel_relaxed Date: Wed, 28 Mar 2018 08:24:41 +1100 Message-ID: <1522185881.7364.55.camel@kernel.crashing.org> 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="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org Sender: "Linuxppc-dev" To: Sinan Kaya , Will Deacon , Arnd Bergmann Cc: Jonathan Corbet , "linux-rdma@vger.kernel.org" , Jason Gunthorpe , Peter Zijlstra , David Laight , Oliver , "Paul E. McKenney" , "open list:LINUX FOR POWERPC (32-BIT AND 64-BIT)" , Ingo Molnar List-Id: linux-rdma@vger.kernel.org On Tue, 2018-03-27 at 09:46 -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. Yes, they should have the same semantics as writel Cheers, Ben.