From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id 58FA2DDE35 for ; Fri, 19 Oct 2007 23:01:24 +1000 (EST) Date: Fri, 19 Oct 2007 08:00:36 -0500 (CDT) From: Kumar Gala To: linuxppc-dev@ozlabs.org Subject: [POWERPC v2] powerpc: Add -mno-spe for ARCH=powerpc builds In-Reply-To: Message-ID: References: <18199.59909.763111.810973@cargo.ozlabs.ibm.com> <12EA14AC-6A3E-4322-9083-0C18996EC227@kernel.crashing.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Paul Mackerras List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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. --- Hopefully this is up to Paul's double standard :) (as normal, its in my git tree, posted here for review). arch/powerpc/Makefile | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 4e16534..bd87626 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) -- 1.5.2.4