linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] powerpc/64s: Fix GENERIC_CPU build flags for PPC970 / G5
@ 2022-09-21  1:41 Nicholas Piggin
  2022-09-21  1:41 ` [PATCH 2/2] powerpc/64s: update cpu selection options Nicholas Piggin
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Nicholas Piggin @ 2022-09-21  1:41 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Nicholas Piggin

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>
---
 arch/powerpc/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 02742facf895..140a5e6471fe 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
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-10-04 13:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-21  1:41 [PATCH 1/2] powerpc/64s: Fix GENERIC_CPU build flags for PPC970 / G5 Nicholas Piggin
2022-09-21  1:41 ` [PATCH 2/2] powerpc/64s: update cpu selection options Nicholas Piggin
2022-09-21 19:03   ` Segher Boessenkool
2022-09-21 16:45 ` [PATCH 1/2] powerpc/64s: Fix GENERIC_CPU build flags for PPC970 / G5 Christophe Leroy
2022-09-21 18:50 ` Segher Boessenkool
2022-09-23  7:17   ` Nicholas Piggin
2022-09-23 12:22     ` Segher Boessenkool
2022-10-04 13:24 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).