Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01718ba6 authored by Scott Wood's avatar Scott Wood
Browse files

powerpc/booke64: Use appropriate -mcpu



By default use -mcpu=powerpc64 rather than -mtune=power7

Add options for e5500/e6500, with fallbacks for older compilers.

Hide the POWER cpu options in booke configs.

Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
parent f49596a4
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -88,13 +88,22 @@ CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcmodel=medium,-mminimal-toc)
CFLAGS-$(CONFIG_PPC64)	+= $(call cc-option,-mno-pointers-to-nested-functions)
CFLAGS-$(CONFIG_PPC64)	+= $(call cc-option,-mno-pointers-to-nested-functions)
CFLAGS-$(CONFIG_PPC32)	:= -ffixed-r2 -mmultiple
CFLAGS-$(CONFIG_PPC32)	:= -ffixed-r2 -mmultiple


ifeq ($(CONFIG_PPC_BOOK3S_64),y)
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power7,-mtune=power4)
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power7,-mtune=power4)
else
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64
endif

CFLAGS-$(CONFIG_CELL_CPU) += $(call cc-option,-mcpu=cell)
CFLAGS-$(CONFIG_CELL_CPU) += $(call cc-option,-mcpu=cell)
CFLAGS-$(CONFIG_POWER4_CPU) += $(call cc-option,-mcpu=power4)
CFLAGS-$(CONFIG_POWER4_CPU) += $(call cc-option,-mcpu=power4)
CFLAGS-$(CONFIG_POWER5_CPU) += $(call cc-option,-mcpu=power5)
CFLAGS-$(CONFIG_POWER5_CPU) += $(call cc-option,-mcpu=power5)
CFLAGS-$(CONFIG_POWER6_CPU) += $(call cc-option,-mcpu=power6)
CFLAGS-$(CONFIG_POWER6_CPU) += $(call cc-option,-mcpu=power6)
CFLAGS-$(CONFIG_POWER7_CPU) += $(call cc-option,-mcpu=power7)
CFLAGS-$(CONFIG_POWER7_CPU) += $(call cc-option,-mcpu=power7)


E5500_CPU := $(call cc-option,-mcpu=e500mc64,-mcpu=powerpc64)
CFLAGS-$(CONFIG_E5500_CPU) += $(E5500_CPU)
CFLAGS-$(CONFIG_E6500_CPU) += $(call cc-option,-mcpu=e6500,$(E5500_CPU))

CFLAGS-$(CONFIG_TUNE_CELL) += $(call cc-option,-mtune=cell)
CFLAGS-$(CONFIG_TUNE_CELL) += $(call cc-option,-mtune=cell)


KBUILD_CPPFLAGS	+= -Iarch/$(ARCH)
KBUILD_CPPFLAGS	+= -Iarch/$(ARCH)
+13 −0
Original line number Original line Diff line number Diff line
@@ -96,18 +96,31 @@ config GENERIC_CPU


config CELL_CPU
config CELL_CPU
	bool "Cell Broadband Engine"
	bool "Cell Broadband Engine"
	depends on PPC_BOOK3S_64


config POWER4_CPU
config POWER4_CPU
	bool "POWER4"
	bool "POWER4"
	depends on PPC_BOOK3S_64


config POWER5_CPU
config POWER5_CPU
	bool "POWER5"
	bool "POWER5"
	depends on PPC_BOOK3S_64


config POWER6_CPU
config POWER6_CPU
	bool "POWER6"
	bool "POWER6"
	depends on PPC_BOOK3S_64


config POWER7_CPU
config POWER7_CPU
	bool "POWER7"
	bool "POWER7"
	depends on PPC_BOOK3S_64

config E5500_CPU
	bool "Freescale e5500"
	depends on E500

config E6500_CPU
	bool "Freescale e6500"
	depends on E500


endchoice
endchoice