[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20221217011021.zr4k2wqdh5nnryw7@pali>
Date: Sat, 17 Dec 2022 02:10:21 +0100
From: Pali Rohár <pali@...nel.org>
To: Christophe Leroy <christophe.leroy@...roup.eu>
Cc: Michael Ellerman <mpe@...erman.id.au>,
Nicholas Piggin <npiggin@...il.com>,
linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
Jan-Benedict Glaw <jbglaw@...-owl.de>
Subject: Re: [PATCH v2] powerpc: Pass correct CPU reference to assembler
On Friday 16 December 2022 09:35:50 Christophe Leroy wrote:
> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> index bf5f0a998273..528452ce80b4 100644
> --- a/arch/powerpc/Makefile
> +++ b/arch/powerpc/Makefile
> @@ -201,18 +201,20 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
> # often slow when they are implemented at all
> KBUILD_CFLAGS += $(call cc-option,-mno-string)
>
> -cpu-as-$(CONFIG_40x) += -Wa,-m405
> -cpu-as-$(CONFIG_44x) += -Wa,-m440
> cpu-as-$(CONFIG_ALTIVEC) += $(call as-option,-Wa$(comma)-maltivec)
> -cpu-as-$(CONFIG_PPC_E500) += -Wa,-me500
> +
> +ifeq ($(CONFIG_TARGET_CPU),powerpc)
> +cpu-as-$(CONFIG_TARGET_CPU_BOOL) += -Wa,-mppc
> +else
> +cpu-as-$(CONFIG_TARGET_CPU_BOOL) += -Wa,-m$(CONFIG_TARGET_CPU)
> +endif
This change will break compilation for e500 cores. Kconfig sets
CONFIG_TARGET_CPU to string "8540" for e500 cores because gcc uses
-mcpu=8540 for e500 but GNU AS uses -me500 for e500 cores.
Powered by blists - more mailing lists