Re: lib/crypto/mips/poly1305-core.S:95: Error: opcode not supported on this processor: mips64r6 (mips64r6) `lwl $8,0+3($5)'

From: Maciej W. Rozycki

Date: Mon Mar 30 2026 - 21:02:02 EST


On Mon, 30 Mar 2026, Eric Biggers wrote:

> > All errors (new ones prefixed by >>):
> >
> > lib/crypto/mips/poly1305-core.S: Assembler messages:
> > >> lib/crypto/mips/poly1305-core.S:95: Error: opcode not supported on this processor: mips64r6 (mips64r6) `lwl $8,0+3($5)'
> > lib/crypto/mips/poly1305-core.S:96: Error: opcode not supported on this processor: mips64r6 (mips64r6) `lwl $9,4+3($5)'
> > lib/crypto/mips/poly1305-core.S:97: Error: opcode not supported on this processor: mips64r6 (mips64r6) `lwl $10,8+3($5)'
> > lib/crypto/mips/poly1305-core.S:98: Error: opcode not supported on this processor: mips64r6 (mips64r6) `lwl $11,12+3($5)'
>
> This isn't new. It was first reported in 2021:
> https://lore.kernel.org/all/202108040636.P6t1LvPP-lkp@xxxxxxxxx/
>
> It's caused by:
>
> CONFIG_64BIT=n causes the 32-bit Poly1305 assembly code to be generated.
> That code checks the _MIPS_ARCH_MIPS32R6 macro. But, the code is
> actually built with -march=mips64r6, due to CONFIG_CPU_MIPS64_R6=y.
> Thus _MIPS_ARCH_MIPS32R6 is not defined; _MIPS_ARCH_MIPS64R6 is defined
> instead. So the wrong code gets built.
>
> Maybe someone from linux-mips@xxxxxxxxxxxxxxx can confirm whether
> CONFIG_64BIT=n && CONFIG_CPU_MIPS64_R6=y actually makes sense?

Absolutely, you can build a 32-bit kernel for and run on 64-bit hardware
and we have supported it since forever across all the MIPS architecture
revisions.

You probably want to check for CONFIG_CPU_MIPSR6 instead (and similarly
for CONFIG_CPU_MIPSR2, etc.).

Maciej