linux/arch/mips/lib
Maciej W. Rozycki ec8bf18814 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: ebabcf17bc ("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>
2026-04-01 21:53:18 +02:00
..
.gitignore lib/crypto: mips: Move arch/mips/lib/crypto/ into lib/crypto/ 2025-06-30 09:26:20 -07:00
bitops.c mips: implement xor_unlock_is_negative_byte 2023-10-18 14:34:17 -07:00
bswapdi.c MIPS: Simplify __bswapdi2() and __bswapsi2() 2022-09-30 16:50:00 +02:00
bswapsi.c MIPS: Simplify __bswapdi2() and __bswapsi2() 2022-09-30 16:50:00 +02:00
csum_partial.S mips: replace #include <asm/export.h> with #include <linux/export.h> 2023-08-15 10:22:23 +02:00
delay.c MIPS: remove asm/war.h 2022-02-22 09:35:49 +01:00
dump_tlb.c MIPS: Remove VR41xx support 2022-07-14 11:52:29 +02:00
iomap_copy.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 504 2019-06-19 17:09:56 +02:00
iomap-pci.c mips: export pci_iounmap() 2025-03-19 18:59:13 +01:00
libgcc.h MIPS: Implement __multi3 for GCC7 MIPS64r6 builds 2018-01-11 14:40:31 +01:00
Makefile Crypto library updates for 6.17 2025-07-28 17:58:52 -07:00
memcpy.S mips: replace #include <asm/export.h> with #include <linux/export.h> 2023-08-15 10:22:23 +02:00
memset.S mips: replace #include <asm/export.h> with #include <linux/export.h> 2023-08-15 10:22:23 +02:00
mips-atomic.c MIPS: Fix kernel hang under FUNCTION_GRAPH_TRACER and PREEMPT_TRACER 2021-05-25 15:33:17 +02:00
multi3.c MIPS: Fix the GCC version check for `__multi3' workaround 2026-04-01 21:53:18 +02:00
r3k_dump_tlb.c MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
strncpy_user.S mips: replace #include <asm/export.h> with #include <linux/export.h> 2023-08-15 10:22:23 +02:00
strnlen_user.S mips: replace #include <asm/export.h> with #include <linux/export.h> 2023-08-15 10:22:23 +02:00
uncached.c MIPS: Only use current_stack_pointer on GCC 2022-03-14 15:02:53 +01:00