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

Kumar Gala galak at kernel.crashing.org
Sat Mar 24 00:37:16 EST 2007


On Mar 23, 2007, at 7:06 AM, Akinobu Mita 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.
>
> Cc: Arnd Bergmann <arnd at arndb.de>
> Cc: Paul Mackerras <paulus at samba.org>
> Signed-off-by: Akinobu Mita <mita at fixstars.com>

Nack.  If GCC is now putting string instructions even if you don't  
specify -mstring than we also need this for CONFIG_FSL_BOOKE.  Please  
fix that up as well.

- k

> ---
>  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)
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev at ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev




More information about the cbe-oss-dev mailing list