]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
powerpc/book3s64: Always build for power4 or later
authorMichael Ellerman <mpe@ellerman.id.au>
Thu, 20 Oct 2016 05:00:14 +0000 (16:00 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 14 Nov 2016 00:11:51 +0000 (11:11 +1100)
When we're not compiling for a specific CPU, ie. none of the
CONFIG_POWERx_CPU options are set, and CONFIG_GENERIC_CPU *is* set, we
currently don't pass any -mcpu option to the compiler. This means the
compiler builds for a "generic" Power CPU.

But back in 2014 we dropped support for pre power4 CPUs in commit
468a33028edd ("powerpc: Drop support for pre-POWER4 cpus").

Given that, there's no point in building the kernel to run on pre power4
cpus. So update the flags we pass to the compiler when
CONFIG_GENERIC_CPU is set, to specify -mcpu=power4.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/Makefile

index 617dece6792427847458203c229505a054b5331e..041fda1e2a5db178892ed1effaf3424b62a72824 100644 (file)
@@ -121,6 +121,7 @@ CFLAGS-$(CONFIG_PPC32)      := -ffixed-r2 $(MULTIPLEWORD)
 
 ifeq ($(CONFIG_PPC_BOOK3S_64),y)
 CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power7,-mtune=power4)
+CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power4
 else
 CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64
 endif