From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from az33egw02.freescale.net (az33egw02.freescale.net [192.88.158.103]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "az33egw02.freescale.net", Issuer "Thawte Premium Server CA" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 0162DDDFD1 for ; Wed, 28 May 2008 04:33:07 +1000 (EST) Message-ID: <483C5414.6050308@freescale.com> Date: Tue, 27 May 2008 13:33:56 -0500 From: Scott Wood MIME-Version: 1.0 To: Trent Piepho Subject: Re: MMIO and gcc re-ordering issue 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> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org, 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: , Trent Piepho wrote: > Is there an issue with anything _besides_ coherent DMA? > > Could one have a special version of the accessors for drivers that > want to assume they are strictly ordered vs coherent DMA memory? > That would be much easier to get right, without slowing _everything_ > down. It's better to be safe by default and then optimize the fast paths than to be relaxed by default and hang the machine in some piece of code that runs once a month. "Premature optimization is the root of all evil", and what not. > One could even go as far as to allow a driver to "#define > WANT_STRICT_IO" and then it would get the strict versions. Add that > to any driver that uses DMA and then worry about vetting those > drivers. See above -- if you must have a #define, then it should be WANT_RELAXED_IO. -Scott