diff mbox series

[5/5] powerpc: Remove cpu-as-y completely

Message ID 20240229122521.762431-5-mpe@ellerman.id.au (mailing list archive)
State Accepted
Commit ca3d3aa14e7673f1b15e862b71998a4664d50ebe
Headers show
Series [1/5] powerpc/64s: Move dcbt/dcbtst sequence into a macro | expand

Checks

Context Check Description
snowpatch_ozlabs/github-powerpc_selftests success Successfully ran 8 jobs.
snowpatch_ozlabs/github-powerpc_sparse success Successfully ran 4 jobs.
snowpatch_ozlabs/github-powerpc_clang success Successfully ran 6 jobs.
snowpatch_ozlabs/github-powerpc_ppctests success Successfully ran 8 jobs.
snowpatch_ozlabs/github-powerpc_kernel_qemu success Successfully ran 23 jobs.

Commit Message

Michael Ellerman Feb. 29, 2024, 12:25 p.m. UTC
From: Christophe Leroy <christophe.leroy@csgroup.eu>

cpu-as-y is there to force assembler building options. But there is no
need for that. GCC is passed the necessary options and it automatically
pass the appropriate option to GAS.

GCC is given -maltivec when relevant, so no need for -Wa,-maltivec
either.

And -Wa,-many is wrong as it will hide innapropriate instructions.
Better to detect them and handle them on a case by case basis.

The setting of -Wa,-many was added by commit 960e30029863
("powerpc/Makefile: Fix PPC_BOOK3S_64 ASFLAGS") in order to fix an issue
with clang and the passed -Wa,-mpower4 option. But we have now removed
it expecting the compiler to automatically pass the proper options and
instructions based on -mcpu=power4.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/Makefile | 12 ------------
 1 file changed, 12 deletions(-)

Comments

Segher Boessenkool Feb. 29, 2024, 5:26 p.m. UTC | #1
On Thu, Feb 29, 2024 at 11:25:21PM +1100, Michael Ellerman wrote:
> From: Christophe Leroy <christophe.leroy@csgroup.eu>

Acked-by: Segher Boessenkool <segher@kernel.crashing.org>


Segher
diff mbox series

Patch

diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 051247027da0..098133b34b68 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -219,18 +219,6 @@  KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
 # often slow when they are implemented at all
 KBUILD_CFLAGS		+= $(call cc-option,-mno-string)
 
-cpu-as-$(CONFIG_ALTIVEC)	+= $(call as-option,-Wa$(comma)-maltivec)
-
-# When using '-many -mpower4' gas will first try and find a matching power4
-# mnemonic and failing that it will allow any valid mnemonic that GAS knows
-# about. GCC will pass -many to GAS when assembling, clang does not.
-# LLVM IAS doesn't understand either flag: https://github.com/ClangBuiltLinux/linux/issues/675
-# but LLVM IAS only supports ISA >= 2.06 for Book3S 64 anyway...
-cpu-as-$(CONFIG_PPC_BOOK3S_64)	+= $(call as-option,-Wa$(comma)-mpower4) $(call as-option,-Wa$(comma)-many)
-
-KBUILD_AFLAGS += $(cpu-as-y)
-KBUILD_CFLAGS += $(cpu-as-y)
-
 KBUILD_AFLAGS += $(aflags-y)
 KBUILD_CFLAGS += $(cflags-y)