All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marvin <marvin24@gmx.de>
To: linuxppc-dev@ozlabs.org
Subject: [5/5] include tuning options into Makefile
Date: Mon, 21 Jul 2008 09:00:58 +0200	[thread overview]
Message-ID: <200807210900.58839.marvin24@gmx.de> (raw)
In-Reply-To: <200807210857.08892.marvin24@gmx.de>


This patch finally adds mcpu/mtune options to the Makefile using the
previous introduced tuning mechanism.

Subject: [PATCH] include tuning options into Makefile

---
 arch/powerpc/Makefile |   41 +++++++++++++++++++++++------------------
 1 files changed, 23 insertions(+), 18 deletions(-)

diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 9629c5e..09f81a7 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -75,30 +75,35 @@ CPP		= $(CC) -E $(KBUILD_CFLAGS)
 CHECKFLAGS	
+= -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__
 
 ifeq ($(CONFIG_PPC64),y)
-GCC_BROKEN_VEC	:= $(shell if [ $(call cc-version) -lt 0400 ] ; then echo "y"; 
fi)
 
-ifeq ($(CONFIG_TUNE_POWER4),y)
-ifeq ($(CONFIG_OPT_EXCLUSIVE),y)
-ifeq ($(CONFIG_ALTIVEC),y)
-ifeq ($(GCC_BROKEN_VEC),y)
-	KBUILD_CFLAGS += $(call cc-option,-mcpu=970)
+ifeq ($(shell if [ $(call cc-version) -lt 0400 ] ; then echo "y"; fi),y)
+    P4CPU := power4
 else
-	KBUILD_CFLAGS += $(call cc-option,-mcpu=power4)
+    P4CPU := 970
 endif
-else
-	KBUILD_CFLAGS += $(call cc-option,-mcpu=power4)
-endif
-else
-	KBUILD_CFLAGS += $(call cc-option,-mtune=power4)
-endif
-	KBUILD_CFLAGS += $(call cc-option,-mtune=power4)
+
+# optimize for specific cpu
+ifeq ($(CONFIG_TUNE_RS64),y)
+    KBUILD_CFLAGS += $(call cc-option,-mcpu=rs64)
+else ifeq ($(CONFIG_TUNE_POWER3),y)
+    KBUILD_CFLAGS += $(call cc-option,-mcpu=power3)
+else ifeq ($(CONFIG_TUNE_POWER4),y)
+    KBUILD_CFLAGS += $(call cc-option,-mcpu=$(P4CPU))
+else ifeq ($(CONFIG_TUNE_CELL),y)
+    KBUILD_CFLAGS += $(call cc-option,-mcpu=cell,-mtune=cell)
+else ifeq ($(CONFIG_TUNE_POWER5),y)
+    KBUILD_CFLAGS += $(call cc-option,-mcpu=power5,-mtune=power5)
+else ifeq ($(CONFIG_TUNE_POWER6),y)
+    KBUILD_CFLAGS += $(call cc-option,-mcpu=power6,-mtune=power6)
 endif
-else
-LDFLAGS_MODULE	+= arch/powerpc/lib/crtsavres.o
+
+ifneq ($(CONFIG_OPT_EXCLUSIVE),y)
+    KBUILD_CFLAGS := $(subst mcpu,mtune,$(KBUILD_CFLAGS))
 endif
 
-ifeq ($(CONFIG_TUNE_CELL),y)
-	KBUILD_CFLAGS += $(call cc-option,-mtune=cell)
+else
+# !PPC64
+    LDFLAGS_MODULE	+= arch/powerpc/lib/crtsavres.o
 endif
 
 # No AltiVec instruction when building kernel
-- 
1.5.6.2

       reply	other threads:[~2008-07-21  7:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200807210857.08892.marvin24@gmx.de>
2008-07-21  7:00 ` Marvin [this message]
2008-07-21  9:55   ` [5/5] include tuning options into Makefile Arnd Bergmann

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=200807210900.58839.marvin24@gmx.de \
    --to=marvin24@gmx.de \
    --cc=linuxppc-dev@ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.