diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2022-07-11 16:19:32 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-07-27 21:36:06 +1000 |
commit | 2255411d1d0f0661d1e5acd5f6edf4e6652a345a (patch) | |
tree | 7a38abcbc3906024394edea18450d47e7d670646 /arch/powerpc/include/asm/synch.h | |
parent | powerpc/405: Fix build failure with GCC 12 (unrecognized opcode: `wrteei') (diff) | |
download | linux-dev-2255411d1d0f0661d1e5acd5f6edf4e6652a345a.tar.xz linux-dev-2255411d1d0f0661d1e5acd5f6edf4e6652a345a.zip |
powerpc/44x: Fix build failure with GCC 12 (unrecognized opcode: `wrteei')
Building ppc40x_defconfig leads to following error
CC arch/powerpc/kernel/idle.o
{standard input}: Assembler messages:
{standard input}:67: Error: unrecognized opcode: `wrteei'
{standard input}:78: Error: unrecognized opcode: `wrteei'
Add -mcpu=440 by default and alternatively 464 and 476.
Once that's done, -mcpu=powerpc is only for book3s/32 now.
But then comes
CC arch/powerpc/kernel/io.o
{standard input}: Assembler messages:
{standard input}:198: Error: unrecognized opcode: `eieio'
{standard input}:230: Error: unrecognized opcode: `eieio'
{standard input}:245: Error: unrecognized opcode: `eieio'
{standard input}:254: Error: unrecognized opcode: `eieio'
{standard input}:273: Error: unrecognized opcode: `eieio'
{standard input}:396: Error: unrecognized opcode: `eieio'
{standard input}:404: Error: unrecognized opcode: `eieio'
{standard input}:423: Error: unrecognized opcode: `eieio'
{standard input}:512: Error: unrecognized opcode: `eieio'
{standard input}:520: Error: unrecognized opcode: `eieio'
{standard input}:539: Error: unrecognized opcode: `eieio'
{standard input}:628: Error: unrecognized opcode: `eieio'
{standard input}:636: Error: unrecognized opcode: `eieio'
{standard input}:655: Error: unrecognized opcode: `eieio'
Fix it by replacing eieio by mbar on booke.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/b0d982e223314ed82ab959f5d4ad2c4c00bedb99.1657549153.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/include/asm/synch.h')
-rw-r--r-- | arch/powerpc/include/asm/synch.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/synch.h b/arch/powerpc/include/asm/synch.h index 1d67bc8d7bc6..7130176d8cb8 100644 --- a/arch/powerpc/include/asm/synch.h +++ b/arch/powerpc/include/asm/synch.h @@ -14,7 +14,10 @@ extern void do_lwsync_fixups(unsigned long value, void *fixup_start, static inline void eieio(void) { - __asm__ __volatile__ ("eieio" : : : "memory"); + if (IS_ENABLED(CONFIG_BOOKE)) + __asm__ __volatile__ ("mbar" : : : "memory"); + else + __asm__ __volatile__ ("eieio" : : : "memory"); } static inline void isync(void) |