[Cbe-oss-dev] [PATCH] force -mno-string option on cell

Akinobu Mita mita at fixstars.com
Fri Mar 23 23:06:19 EST 2007


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.

Cc: Arnd Bergmann <arnd at arndb.de>
Cc: Paul Mackerras <paulus at samba.org>
Signed-off-by: Akinobu Mita <mita at fixstars.com>

---
 arch/powerpc/Makefile |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Index: 2.6-git-ps3/arch/powerpc/Makefile
===================================================================
--- 2.6-git-ps3.orig/arch/powerpc/Makefile
+++ 2.6-git-ps3/arch/powerpc/Makefile
@@ -102,8 +102,9 @@ CFLAGS += $(call cc-option,-mno-altivec)
 # kernel considerably.
 CFLAGS += $(call cc-option,-funit-at-a-time)
 
-ifndef CONFIG_FSL_BOOKE
-CFLAGS		+= -mstring
+# No string instruction for SPE local store areas
+ifeq ($(CONFIG_PPC_CELL),y)
+CFLAGS		+= -mno-string
 endif
 
 ifeq ($(CONFIG_6xx),y)



More information about the cbe-oss-dev mailing list