aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/Makefile25
-rw-r--r--arch/powerpc/platforms/Kconfig.cputype30
2 files changed, 42 insertions, 13 deletions
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 6ee3beb4d264..159e94f4b22a 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -69,6 +69,16 @@ LDFLAGS_vmlinux := $(LDFLAGS_vmlinux-y)
69 69
70CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=no -mcall-aixdesc 70CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=no -mcall-aixdesc
71CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 -mmultiple 71CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 -mmultiple
72
73CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power7,-mtune=power4)
74CFLAGS-$(CONFIG_CELL_CPU) += $(call cc-option,-mcpu=cell)
75CFLAGS-$(CONFIG_POWER4_CPU) += $(call cc-option,-mcpu=power4)
76CFLAGS-$(CONFIG_POWER5_CPU) += $(call cc-option,-mcpu=power5)
77CFLAGS-$(CONFIG_POWER6_CPU) += $(call cc-option,-mcpu=power6)
78CFLAGS-$(CONFIG_POWER7_CPU) += $(call cc-option,-mcpu=power7)
79
80CFLAGS-$(CONFIG_TUNE_CELL) += $(call cc-option,-mtune=cell)
81
72KBUILD_CPPFLAGS += -Iarch/$(ARCH) 82KBUILD_CPPFLAGS += -Iarch/$(ARCH)
73KBUILD_AFLAGS += -Iarch/$(ARCH) 83KBUILD_AFLAGS += -Iarch/$(ARCH)
74KBUILD_CFLAGS += -msoft-float -pipe -Iarch/$(ARCH) $(CFLAGS-y) 84KBUILD_CFLAGS += -msoft-float -pipe -Iarch/$(ARCH) $(CFLAGS-y)
@@ -76,22 +86,11 @@ CPP = $(CC) -E $(KBUILD_CFLAGS)
76 86
77CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__ 87CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__
78 88
79ifeq ($(CONFIG_PPC64),y)
80ifeq ($(CONFIG_POWER4_ONLY),y)
81 KBUILD_CFLAGS += $(call cc-option,-mcpu=power4)
82else
83 KBUILD_CFLAGS += $(call cc-option,-mtune=power4)
84endif
85endif
86
87KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o 89KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o
88 90
89ifeq ($(CONFIG_TUNE_CELL),y) 91# No AltiVec or VSX instructions when building kernel
90 KBUILD_CFLAGS += $(call cc-option,-mtune=cell)
91endif
92
93# No AltiVec instruction when building kernel
94KBUILD_CFLAGS += $(call cc-option,-mno-altivec) 92KBUILD_CFLAGS += $(call cc-option,-mno-altivec)
93KBUILD_CFLAGS += $(call cc-option,-mno-vsx)
95 94
96# No SPE instruction when building kernel 95# No SPE instruction when building kernel
97# (We use all available options to help semi-broken compilers) 96# (We use all available options to help semi-broken compilers)
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index 52e70f9b7a8f..0b7314592134 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -78,6 +78,36 @@ config PPC_BOOK3E_64
78 78
79endchoice 79endchoice
80 80
81choice
82 prompt "CPU selection"
83 depends on PPC64
84 default GENERIC_CPU
85 help
86 This will create a kernel which is optimised for a particular CPU.
87 The resulting kernel may not run on other CPUs, so use this with care.
88
89 If unsure, select Generic.
90
91config GENERIC_CPU
92 bool "Generic"
93
94config CELL_CPU
95 bool "Cell Broadband Engine"
96
97config POWER4_CPU
98 bool "POWER4"
99
100config POWER5_CPU
101 bool "POWER5"
102
103config POWER6_CPU
104 bool "POWER6"
105
106config POWER7_CPU
107 bool "POWER7"
108
109endchoice
110
81config PPC_BOOK3S 111config PPC_BOOK3S
82 def_bool y 112 def_bool y
83 depends on PPC_BOOK3S_32 || PPC_BOOK3S_64 113 depends on PPC_BOOK3S_32 || PPC_BOOK3S_64