]> git.ipfire.org Git - thirdparty/linux.git/commit
MIPS: Fix the GCC version check for `__multi3' workaround
authorMaciej W. Rozycki <macro@orcam.me.uk>
Mon, 30 Mar 2026 01:54:09 +0000 (02:54 +0100)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Wed, 1 Apr 2026 19:53:18 +0000 (21:53 +0200)
commitec8bf18814915460d9c617b556bf024efef26613
tree181bc1b288fbe1557f628d035a5080ee2a541ad6
parentd62cf1511743526f530a4c169424e50c757f5a5e
MIPS: Fix the GCC version check for `__multi3' workaround

It was only GCC 10 that fixed a MIPS64r6 code generation issue with a
`__multi3' libcall inefficiently produced to perform 64-bit widening
multiplication while suitable machine instructions exist to do such a
calculation.  The fix went in with GCC commit 48b2123f6336 ("re PR
target/82981 (unnecessary __multi3 call for mips64r6 linux kernel)").

Adjust our code accordingly, removing build failures such as:

mips64-linux-ld: lib/math/div64.o: in function `mul_u64_add_u64_div_u64':
div64.c:(.text+0x84): undefined reference to `__multi3'

with the GCC versions affected.

Fixes: ebabcf17bcd7 ("MIPS: Implement __multi3 for GCC7 MIPS64r6 builds")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202601140146.hMLODc6v-lkp@intel.com/
Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
Cc: stable@vger.kernel.org # v4.15+
Reviewed-by: David Laight <david.laight.linux@gmail.com.
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/lib/multi3.c