* Re: lib/crypto/mips/poly1305-core.S:95: Error: opcode not supported on this processor: mips64r6 (mips64r6) `lwl $8,0+3($5)'
[not found] <202603210105.sdD4rsTq-lkp@intel.com>
@ 2026-03-30 20:37 ` Eric Biggers
2026-03-31 1:01 ` Maciej W. Rozycki
0 siblings, 1 reply; 3+ messages in thread
From: Eric Biggers @ 2026-03-30 20:37 UTC (permalink / raw)
To: kernel test robot
Cc: oe-kbuild-all, linux-kernel, Martin K. Petersen, Sohil Mehta,
linux-crypto, linux-mips, Jason A. Donenfeld, Thomas Bogendoerfer
[+Cc linux-mips and linux-crypto]
On Sat, Mar 21, 2026 at 01:47:15AM +0800, kernel test robot wrote:
> Hi Eric,
>
> First bad commit (maybe != root cause):
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 0e4f8f1a3d081e834be5fd0a62bdb2554fadd307
> commit: 7e54e993ab8c98d912f54ad6f46bfcc9dcd65368 lib/crypto: mips: Move arch/mips/lib/crypto/ into lib/crypto/
> date: 9 months ago
> config: mips-randconfig-r131-20260320 (https://download.01.org/0day-ci/archive/20260321/202603210105.sdD4rsTq-lkp@intel.com/config)
> compiler: mips-linux-gcc (GCC) 11.5.0
> sparse: v0.6.5-rc1
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260321/202603210105.sdD4rsTq-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202603210105.sdD4rsTq-lkp@intel.com/
>
> 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@intel.com/
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@vger.kernel.org can confirm whether
CONFIG_64BIT=n && CONFIG_CPU_MIPS64_R6=y actually makes sense?
- Eric
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: lib/crypto/mips/poly1305-core.S:95: Error: opcode not supported on this processor: mips64r6 (mips64r6) `lwl $8,0+3($5)'
2026-03-30 20:37 ` lib/crypto/mips/poly1305-core.S:95: Error: opcode not supported on this processor: mips64r6 (mips64r6) `lwl $8,0+3($5)' Eric Biggers
@ 2026-03-31 1:01 ` Maciej W. Rozycki
2026-03-31 1:48 ` Eric Biggers
0 siblings, 1 reply; 3+ messages in thread
From: Maciej W. Rozycki @ 2026-03-31 1:01 UTC (permalink / raw)
To: Eric Biggers
Cc: kernel test robot, oe-kbuild-all, linux-kernel,
Martin K. Petersen, Sohil Mehta, linux-crypto, linux-mips,
Jason A. Donenfeld, Thomas Bogendoerfer
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@intel.com/
>
> 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@vger.kernel.org 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: lib/crypto/mips/poly1305-core.S:95: Error: opcode not supported on this processor: mips64r6 (mips64r6) `lwl $8,0+3($5)'
2026-03-31 1:01 ` Maciej W. Rozycki
@ 2026-03-31 1:48 ` Eric Biggers
0 siblings, 0 replies; 3+ messages in thread
From: Eric Biggers @ 2026-03-31 1:48 UTC (permalink / raw)
To: Maciej W. Rozycki
Cc: kernel test robot, oe-kbuild-all, linux-kernel,
Martin K. Petersen, Sohil Mehta, linux-crypto, linux-mips,
Jason A. Donenfeld, Thomas Bogendoerfer
On Tue, Mar 31, 2026 at 02:01:44AM +0100, Maciej W. Rozycki wrote:
> 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@intel.com/
> >
> > 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@vger.kernel.org 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.).
Okay, but does it make sense to use -march=mips64r6 in that case,
instead of -march=mips32r6? I guess you get something that uses the
32-bit ABI but is free to use 64-bit instructions? It looks like
poly1305-mips.pl doesn't really support that combination: it just has
32-bit ABI + 32-bit instructions, and 64-bit ABI + 64-bit instructions.
Maybe it would be easiest to always compile poly1305-mips.pl with the
corresponding mips32 flag when CONFIG_64BIT is unset? Note: since
poly1305-mips.pl was taken from an external source
(https://github.com/dot-asm/cryptogams/blob/master/mips/poly1305-mips.pl),
modifying the build system to pass the appropriate flag might be
preferable to extensive local patching of that file.
- Eric
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-31 1:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <202603210105.sdD4rsTq-lkp@intel.com>
2026-03-30 20:37 ` lib/crypto/mips/poly1305-core.S:95: Error: opcode not supported on this processor: mips64r6 (mips64r6) `lwl $8,0+3($5)' Eric Biggers
2026-03-31 1:01 ` Maciej W. Rozycki
2026-03-31 1:48 ` Eric Biggers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox