Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305361
b: refs/heads/master
c: d23c6fb
h: refs/heads/master
i:
  305359: 2bc5692
v: v3
  • Loading branch information
Anton Blanchard authored and Benjamin Herrenschmidt committed Apr 30, 2012
1 parent 8ad423d commit d05628a
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 894a65c857b2e595da1c65d1ad1a7c559ac88c8d
refs/heads/master: d23c6fb4ebf7d3563dd801c95b22ada4516e35ce
25 changes: 12 additions & 13 deletions trunk/arch/powerpc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,29 +69,28 @@ 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)
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)
Expand Down
30 changes: 30 additions & 0 deletions trunk/arch/powerpc/platforms/Kconfig.cputype
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d05628a

Please sign in to comment.