From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Deacon Subject: Re: RFC on writel and writel_relaxed Date: Wed, 28 Mar 2018 09:53:39 +0100 Message-ID: <20180328085338.GA28871@arm.com> References: <1522141019.7364.43.camel@kernel.crashing.org> <20180327095745.GB29373@arm.com> <20180327100944.GD29373@arm.com> <20180327110258.GF2464@arm.com> <20180327143628.GA10642@arm.com> <1522186185.7364.59.camel@kernel.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1522186185.7364.59.camel@kernel.crashing.org> 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: Benjamin Herrenschmidt Cc: Arnd Bergmann , Jonathan Corbet , "linux-rdma@vger.kernel.org" , Sinan Kaya , 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 Wed, Mar 28, 2018 at 08:29:45AM +1100, Benjamin Herrenschmidt wrote: > On Tue, 2018-03-27 at 15:36 +0100, Will Deacon wrote: > > > 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. > > Ugh ? > > My understanding of HW at least is the exact opposite. outX is *more* > ordered if anything, than any other accessors. IO space is completely > synchronous, non posted and ordered afaik. I'm just going by memory-barriers.txt: (*) inX(), outX(): [...] They are guaranteed to be fully ordered with respect to each other. They are not guaranteed to be fully ordered with respect to other types of memory and I/O operation. For arm/arm64 these end up behaving exactly the same as readX/writeX, but I'm nervous about changing the documentation without understanding why it's like it is currently. Maybe another ia64 thing?. Will