From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [PATCH] force -mno-string option on cell From: Benjamin Herrenschmidt To: Segher Boessenkool In-Reply-To: References: <1174544624.10836.24.camel@localhost.localdomain> <94d8e19d4b061504fcfd08d1ab70cc78@kernel.crashing.org> <20070323120619.GA7472@localhost.localdomain> Content-Type: text/plain Date: Sat, 24 Mar 2007 06:38:23 +1100 Message-Id: <1174678703.10836.69.camel@localhost.localdomain> Mime-Version: 1.0 Cc: Akinobu Mita , Paul Mackerras , cbe-oss-dev@ozlabs.org, Arnd Bergmann , linuxppc-dev list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Fri, 2007-03-23 at 13:56 +0100, Segher Boessenkool wrote: > > GCC may generate inline copy loop to handle memcpy() function > > instead of kernel defined memcpy() with -mstring or -Os. > > But this inlined version of memcpy() caused an alignment interrupt > > when copying from SPU local store on PS3. > > (http://ozlabs.org/pipermail/cbe-oss-dev/2007-March/001348.html) > > > > This patch deletes -mstring option on all powerpc and force -mno-string > > option on Cell. > > Please split into two patches, the first half (deleting > -mstring) we can all agree on and "the other half". > > What your patch does is setting -mno-string for all files > if your kernel is configured to support Cell. It would be > better to set this option (and all other options needed, > -mno-multiple and -mno-algebraic come to mind, and that last > compiler option doesn't even exist yet) unconditionally on > the few Cell-specific files that are affected, not on the > whole kernel: > > CFLAGS_whatever.o := -msome-flags > > It would be even better to not lie to the compiler by > telling it it can use the LS area as normal memory, since > evidently it cannot :-) It's fair enough to use -mno-string overall. If the kernel is going to run on cell, performance will suck with string instructions. In fact, I'm not sure they are worth having on anything anyway. Ben.