linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Kumar Gala <galak@kernel.crashing.org>
To: linuxppc-dev@ozlabs.org
Cc: Paul Mackerras <paulus@samba.org>
Subject: [POWERPC v2] powerpc: Add -mno-spe for ARCH=powerpc builds
Date: Fri, 19 Oct 2007 08:00:36 -0500 (CDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0710190758570.11164@blarg.am.freescale.net> (raw)
In-Reply-To: <E1IirI4-0004Ch-3P@jdl.com>

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

      reply	other threads:[~2007-10-19 13:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-18 21:55 [PATCH] [POWERPC] powerpc: Add -mno-spe for ARCH=powerpc builds Kumar Gala
2007-10-18 23:19 ` Paul Mackerras
2007-10-19  3:20   ` Kumar Gala
2007-10-19 11:59     ` Josh Boyer
2007-10-19 12:49     ` Jon Loeliger
2007-10-19 13:00       ` Kumar Gala [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0710190758570.11164@blarg.am.freescale.net \
    --to=galak@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).