From: Kumar Gala Date: Thu, 18 Oct 2007 21:53:19 +0000 (-0500) Subject: [POWERPC] Add -mno-spe for ARCH=powerpc builds X-Git-Tag: v2.6.24-rc3~146^2~5^2~2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0197cd2e350a7151080e7335577e956f1f84a8cb;p=linux-2.6 [POWERPC] Add -mno-spe for ARCH=powerpc builds Newer GCC's are capable of autovectorization for ISA extensions like AltiVec and SPE. If we happen to build with one of those compilers we will get SPE instructions in random kernel code. Today we only allow basic interger code in the kernel and FP, AltiVec, or SPE in special explicit locations that have handled the proper saving and restoring of the register state (since on uniprocessor we lazy context switch the register state for FP, AltiVec, and SPE). -mno-spe disables the compiler for automatically generating SPE instructions without our knowledge. Signed-off-by: Kumar Gala --- diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 4e16534221..bd87626c1f 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -107,6 +107,9 @@ endif # No AltiVec instruction when building kernel KBUILD_CFLAGS += $(call cc-option,-mno-altivec) +# No SPE instruction when building kernel +KBUILD_CFLAGS += $(call cc-option,-mno-spe) + # Enable unit-at-a-time mode when possible. It shrinks the # kernel considerably. KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)