From: Michael Ellerman <mpe@ellerman.id.au>
To: "Christophe Leroy" <christophe.leroy@csgroup.eu>,
"Pali Rohár" <pali@kernel.org>
Cc: Nicholas Piggin <npiggin@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH v1 5/5] powerpc/64e: Fix build failure with GCC 12 (unrecognized opcode: `wrteei')
Date: Mon, 12 Dec 2022 21:27:59 +1100 [thread overview]
Message-ID: <87edt4kjbk.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <101320ce-8f0c-d4d8-9d73-7f231d651f4e@csgroup.eu>
Christophe Leroy <christophe.leroy@csgroup.eu> writes:
> Le 11/12/2022 à 18:32, Pali Rohár a écrit :
>> On Monday 11 July 2022 16:19:33 Christophe Leroy wrote:
>>> With GCC 12, corenet64_smp_defconfig leads to the following build errors:
>>>
>>> CC arch/powerpc/kernel/irq.o
>>> {standard input}: Assembler messages:
>>> {standard input}:3616: Error: unrecognized opcode: `wrteei'
>>> {standard input}:5689: Error: unrecognized opcode: `wrteei'
>>> CC arch/powerpc/kernel/pmc.o
>>> {standard input}: Assembler messages:
>>> {standard input}:42: Error: unrecognized opcode: `mfpmr'
>>> {standard input}:53: Error: unrecognized opcode: `mtpmr'
>>> CC arch/powerpc/kernel/io.o
>>> {standard input}: Assembler messages:
>>> {standard input}:376: Error: unrecognized opcode: `mbar'
>>> ...
>>> CC arch/powerpc/mm/nohash/book3e_hugetlbpage.o
>>> {standard input}: Assembler messages:
>>> {standard input}:291: Error: unrecognized opcode: `tlbsx'
>>> {standard input}:482: Error: unrecognized opcode: `tlbwe'
>>> {standard input}:608: Error: unrecognized opcode: `lbarx'
>>> {standard input}:608: Error: unrecognized opcode: `stbcx.'
>>>
>>> -mpcu=powerpc64 cannot be used anymore for book3e, it must be a booke CPU.
>>>
>>> But then we get:
>>>
>>> CC arch/powerpc/lib/xor_vmx.o
>>> cc1: error: AltiVec not supported in this target
>>>
>>> Altivec is not supported with -mcpu=e5500 so don't allow selection
>>> of altivec when e5500 is selected.
>>>
>>> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
>>> ---
>>> arch/powerpc/Makefile | 8 +-------
>>> arch/powerpc/platforms/Kconfig.cputype | 8 ++++----
>>> 2 files changed, 5 insertions(+), 11 deletions(-)
>>>
>>> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
>>> index d54e1fe03551..02742facf895 100644
>>> --- a/arch/powerpc/Makefile
>>> +++ b/arch/powerpc/Makefile
>>> @@ -168,13 +168,7 @@ endif
>>> CFLAGS-$(CONFIG_TARGET_CPU_BOOL) += $(call cc-option,-mcpu=$(CONFIG_TARGET_CPU))
>>> AFLAGS-$(CONFIG_TARGET_CPU_BOOL) += $(call cc-option,-mcpu=$(CONFIG_TARGET_CPU))
>>>
>>> -# Altivec option not allowed with e500mc64 in GCC.
>>> -ifdef CONFIG_ALTIVEC
>>> -E5500_CPU := -mcpu=powerpc64
>>> -else
>>> -E5500_CPU := $(call cc-option,-mcpu=e500mc64,-mcpu=powerpc64)
>>> -endif
>>> -CFLAGS-$(CONFIG_E5500_CPU) += $(E5500_CPU)
>>> +CFLAGS-$(CONFIG_E5500_CPU) += $(call cc-option,-mcpu=e500mc64,-mcpu=powerpc64)
>>> CFLAGS-$(CONFIG_E6500_CPU) += $(call cc-option,-mcpu=e6500,$(E5500_CPU))
>>
>> Hello! I think that there is an issue. After removal of E5500_CPU
>> variable few line above, it cannot be used in CFLAGS-$(CONFIG_E6500_CPU)
>> assignment, because it is empty.
>>
>
> Ah yes, you are right.
>
> It should be fixed by
> https://github.com/linuxppc/linux/commit/f2636eaac7dee1d7d096cc115ff4f5111b0c508c
>
> Michael, I see the patch is in next-test. Can you add:
>
> Fixes: d6b551b8f90c ("powerpc/64e: Fix build failure with GCC 12
> (unrecognized opcode: `wrteei')")
Yep, will do.
cheers
next prev parent reply other threads:[~2022-12-12 10:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-11 14:19 [PATCH v1 1/5] powerpc/32: Do not allow selection of e5500 or e6500 CPUs on PPC32 Christophe Leroy
2022-07-11 14:19 ` [PATCH v1 2/5] powerpc/32: Don't always pass -mcpu=powerpc to the compiler Christophe Leroy
2022-07-11 16:50 ` Segher Boessenkool
2022-08-18 17:46 ` Pali Rohár
2022-08-20 10:55 ` Pali Rohár
2022-07-11 14:19 ` [PATCH v1 3/5] powerpc/405: Fix build failure with GCC 12 (unrecognized opcode: `wrteei') Christophe Leroy
2022-07-11 14:19 ` [PATCH v1 4/5] powerpc/44x: " Christophe Leroy
2022-07-11 15:05 ` Arnd Bergmann
2022-07-11 15:49 ` Christophe Leroy
2022-07-11 17:12 ` Segher Boessenkool
2022-07-11 14:19 ` [PATCH v1 5/5] powerpc/64e: " Christophe Leroy
2022-12-11 17:32 ` Pali Rohár
2022-12-12 7:36 ` Christophe Leroy
2022-12-12 10:27 ` Michael Ellerman [this message]
2022-07-11 16:39 ` [PATCH v1 1/5] powerpc/32: Do not allow selection of e5500 or e6500 CPUs on PPC32 Segher Boessenkool
2022-07-11 17:42 ` Christophe Leroy
2022-07-29 13:02 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87edt4kjbk.fsf@mpe.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=christophe.leroy@csgroup.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=npiggin@gmail.com \
--cc=pali@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox