aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/Makefile
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2022-09-21 11:41:02 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2022-09-28 19:22:10 +1000
commit58ec7f06b74e0d6e76c4110afce367c8b5f0837d (patch)
tree6dba67f69d3106df93ec6df1103cfc92f9052bd4 /arch/powerpc/Makefile
parentpowerpc/64s: Make POWER10 and later use pause_short in cpu_relax loops (diff)
downloadlinux-dev-58ec7f06b74e0d6e76c4110afce367c8b5f0837d.tar.xz
linux-dev-58ec7f06b74e0d6e76c4110afce367c8b5f0837d.zip
powerpc/64s: Fix GENERIC_CPU build flags for PPC970 / G5
Big-endian GENERIC_CPU supports 970, but builds with -mcpu=power5. POWER5 is ISA v2.02 whereas 970 is v2.01 plus Altivec. 2.02 added the popcntb instruction which a compiler might use. Use -mcpu=power4. Fixes: 471d7ff8b51b ("powerpc/64s: Remove POWER4 support") Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Reviewed-by: Segher Boessenkool <segher@kernel.crashing.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220921014103.587954-1-npiggin@gmail.com
Diffstat (limited to 'arch/powerpc/Makefile')
-rw-r--r--arch/powerpc/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index cb01832385d0..3bed2c6dcf12 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -152,7 +152,7 @@ CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power8
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power9,-mtune=power8)
else
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power7,$(call cc-option,-mtune=power5))
-CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mcpu=power5,-mcpu=power4)
+CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power4
endif
else ifdef CONFIG_PPC_BOOK3E_64
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64