From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org, paulus@samba.org,
Anton Blanchard <anton@samba.org>
Subject: Re: [PATCH 3/4] powerpc: Add 64-bit CPU targets for gcc
Date: Mon, 30 Apr 2012 15:57:34 +1000 [thread overview]
Message-ID: <1335765454.20866.41.camel@pasglop> (raw)
In-Reply-To: <7A78BE77-1D97-4E8D-B8F3-026E2B3B2EEA@kernel.crashing.org>
On Wed, 2012-04-18 at 09:33 -0500, Kumar Gala wrote:
> On Apr 17, 2012, at 11:45 PM, Anton Blanchard wrote:
>
> >
> > Add a menu to select various 64-bit CPU targets for gcc. We
> > default to -mtune=power7 and if gcc doesn't understand that we
> > fallback to -mtune=power4.
> >
> > Signed-off-by: Anton Blanchard <anton@samba.org>
> > ---
>
> Can you add a target for e5500 cpu.
I'm going to put Anton patch in, can you send an add-on for e5500 ?
Cheers,
Ben.
> - k
>
> >
> > Index: linux-build/arch/powerpc/Makefile
> > ===================================================================
> > --- linux-build.orig/arch/powerpc/Makefile 2012-04-18 14:31:31.614666419 +1000
> > +++ linux-build/arch/powerpc/Makefile 2012-04-18 14:37:08.680708678 +1000
> > @@ -69,6 +69,16 @@ LDFLAGS_vmlinux := $(LDFLAGS_vmlinux-y)
> >
> > CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=no -mcall-aixdesc
> > CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 -mmultiple
> > +
> > +CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power7,-mtune=power4)
> > +CFLAGS-$(CONFIG_CELL_CPU) += $(call cc-option,-mcpu=cell)
> > +CFLAGS-$(CONFIG_POWER4_CPU) += $(call cc-option,-mcpu=power4)
> > +CFLAGS-$(CONFIG_POWER5_CPU) += $(call cc-option,-mcpu=power5)
> > +CFLAGS-$(CONFIG_POWER6_CPU) += $(call cc-option,-mcpu=power6)
> > +CFLAGS-$(CONFIG_POWER7_CPU) += $(call cc-option,-mcpu=power7)
> > +
> > +CFLAGS-$(CONFIG_TUNE_CELL) += $(call cc-option,-mtune=cell)
> > +
> > KBUILD_CPPFLAGS += -Iarch/$(ARCH)
> > KBUILD_AFLAGS += -Iarch/$(ARCH)
> > KBUILD_CFLAGS += -msoft-float -pipe -Iarch/$(ARCH) $(CFLAGS-y)
> > @@ -76,22 +86,11 @@ CPP = $(CC) -E $(KBUILD_CFLAGS)
> >
> > CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__
> >
> > -ifeq ($(CONFIG_PPC64),y)
> > -ifeq ($(CONFIG_POWER4_ONLY),y)
> > - KBUILD_CFLAGS += $(call cc-option,-mcpu=power4)
> > -else
> > - KBUILD_CFLAGS += $(call cc-option,-mtune=power4)
> > -endif
> > -endif
> > -
> > KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o
> >
> > -ifeq ($(CONFIG_TUNE_CELL),y)
> > - KBUILD_CFLAGS += $(call cc-option,-mtune=cell)
> > -endif
> > -
> > -# No AltiVec instruction when building kernel
> > +# No AltiVec or VSX instructions when building kernel
> > KBUILD_CFLAGS += $(call cc-option,-mno-altivec)
> > +KBUILD_CFLAGS += $(call cc-option,-mno-vsx)
> >
> > # No SPE instruction when building kernel
> > # (We use all available options to help semi-broken compilers)
> > Index: linux-build/arch/powerpc/platforms/Kconfig.cputype
> > ===================================================================
> > --- linux-build.orig/arch/powerpc/platforms/Kconfig.cputype 2012-04-18 14:31:25.134549903 +1000
> > +++ linux-build/arch/powerpc/platforms/Kconfig.cputype 2012-04-18 14:36:40.576207829 +1000
> > @@ -78,6 +78,36 @@ config PPC_BOOK3E_64
> >
> > endchoice
> >
> > +choice
> > + prompt "CPU selection"
> > + depends on PPC64
> > + default GENERIC_CPU
> > + help
> > + This will create a kernel which is optimised for a particular CPU.
> > + The resulting kernel may not run on other CPUs, so use this with care.
> > +
> > + If unsure, select Generic.
> > +
> > +config GENERIC_CPU
> > + bool "Generic"
> > +
> > +config CELL_CPU
> > + bool "Cell Broadband Engine"
> > +
> > +config POWER4_CPU
> > + bool "POWER4"
> > +
> > +config POWER5_CPU
> > + bool "POWER5"
> > +
> > +config POWER6_CPU
> > + bool "POWER6"
> > +
> > +config POWER7_CPU
> > + bool "POWER7"
> > +
> > +endchoice
> > +
> > config PPC_BOOK3S
> > def_bool y
> > depends on PPC_BOOK3S_32 || PPC_BOOK3S_64
> > _______________________________________________
> > Linuxppc-dev mailing list
> > Linuxppc-dev@lists.ozlabs.org
> > https://lists.ozlabs.org/listinfo/linuxppc-dev
next prev parent reply other threads:[~2012-04-30 5:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-18 4:42 [PATCH 1/4] powerpc: Require gcc 4.0 on 64-bit Anton Blanchard
2012-04-18 4:44 ` [PATCH 2/4] powerpc: Remove altivec fix for gcc versions before 4.0 Anton Blanchard
2012-04-18 4:45 ` [PATCH 3/4] powerpc: Add 64-bit CPU targets for gcc Anton Blanchard
2012-04-18 14:33 ` Kumar Gala
2012-04-30 5:57 ` Benjamin Herrenschmidt [this message]
2012-04-18 4:46 ` [PATCH 4/4] powerpc: Remove CONFIG_POWER4_ONLY Anton Blanchard
2012-04-18 6:46 ` Benjamin Herrenschmidt
2012-04-18 6:51 ` Anton Blanchard
2012-04-18 6:57 ` Benjamin Herrenschmidt
2012-04-18 12:21 ` Anton Blanchard
2012-04-18 14:28 ` [PATCH 1/4] powerpc: Require gcc 4.0 on 64-bit Kumar Gala
2012-04-18 22:17 ` Benjamin Herrenschmidt
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=1335765454.20866.41.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=anton@samba.org \
--cc=galak@kernel.crashing.org \
--cc=linuxppc-dev@lists.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 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.