From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.parisc-linux.org (palinux.external.hp.com [192.25.206.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail.parisc-linux.org", Issuer "CAcert Class 3 Root" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 9C88DDDFAD for ; Wed, 28 May 2008 08:04:09 +1000 (EST) Date: Tue, 27 May 2008 15:42:41 -0600 From: Matthew Wilcox To: Benjamin Herrenschmidt Subject: Re: MMIO and gcc re-ordering issue Message-ID: <20080527214241.GA22636@parisc-linux.org> References: <1211852026.3286.36.camel@pasglop> <20080526.184047.88207142.davem@davemloft.net> <1211854540.3286.42.camel@pasglop> <20080526.192812.184590464.davem@davemloft.net> <1211859542.3286.46.camel@pasglop> <1211922621.3286.80.camel@pasglop> <1211924335.3286.89.camel@pasglop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <1211924335.3286.89.camel@pasglop> Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, tpiepho@freescale.com, linuxppc-dev@ozlabs.org, scottwood@freescale.com, Linus Torvalds , David Miller , alan@lxorguk.ukuu.org.uk List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, May 28, 2008 at 07:38:55AM +1000, Benjamin Herrenschmidt wrote: > A problem with __raw_ though is that they -also- don't do byteswap, > which is a pain in the neck as people use them for either one reason > (relaxed ordering) or the other (no byteswap) without always knowing the > consequences of doing so... That's why there's __readl() which does byteswap, but doesn't do ordering ... > I'm happy to say that __raw is purely about ordering and make them > byteswap on powerpc tho (ie, make them little endian like the non-raw > counterpart). That would break a lot of drivers. > Some archs started providing writel_be etc... I added those to powerpc a > little while ago, and I tend to prefer that approach for the byteswap > issue. Those are for people who use big endian chips on little endian architectures. -- Intel are signing my paycheques ... these opinions are still mine "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step."