[patch 3/3] cell: prevent alignment interrupt on local store

Akinobu Mita mita at fixstars.com
Tue Apr 10 21:15:08 EST 2007


An Alignment interrupt occurs when the instruction is lmw, stmw, lswi, lswx,
stswi, or stswx, and the operand is in local store.

GCC generated such instructions to handle memcpy() instead of kernel
defined memcpy() without -mno-string option.

Signed-off-by: Akinobu Mita <mita at fixstars.com>

Index: 2.6-git-ps3/arch/powerpc/platforms/cell/spufs/Makefile
===================================================================
--- 2.6-git-ps3.orig/arch/powerpc/platforms/cell/spufs/Makefile
+++ 2.6-git-ps3/arch/powerpc/platforms/cell/spufs/Makefile
@@ -4,6 +4,11 @@ obj-$(CONFIG_SPU_FS) += spufs.o
 spufs-y += inode.o file.o context.o syscalls.o coredump.o
 spufs-y += sched.o backing_ops.o hw_ops.o run.o gang.o
 
+# An Alignment interrupt occurs when the instruction is lmw, stmw, lswi, lswx,
+# stswi, or stswx, and the operand is in local store.
+CFLAGS_run.o := -mno-string
+CFLAGS_file.o := -mno-string
+
 # Rules to build switch.o with the help of SPU tool chain
 SPU_CROSS	:= spu-
 SPU_CC		:= $(SPU_CROSS)gcc



More information about the Linuxppc-dev mailing list