public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
From: David Laight <david.laight.linux@gmail.com>
To: kernel test robot <lkp@intel.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Nicolas Pitre <npitre@baylibre.com>
Subject: Re: div64.c:(.text.mul_u64_add_u64_div_u64+0x40): undefined reference to `__multi3'
Date: Sat, 21 Mar 2026 09:24:14 +0000	[thread overview]
Message-ID: <20260321092414.542ad642@pumpkin> (raw)
In-Reply-To: <202603211216.YTKRdi1b-lkp@intel.com>

On Sat, 21 Mar 2026 12:48:23 +0800
kernel test robot <lkp@intel.com> wrote:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   42bddab0563fe67882b2722620a66dd98c8dbf33
> commit: 6480241f31f543333ed0c7a209962412461f6e41 lib: add mul_u64_add_u64_div_u64() and mul_u64_u64_div_u64_roundup()
> date:   4 months ago
> config: mips-randconfig-r122-20260321 (https://download.01.org/0day-ci/archive/20260321/202603211216.YTKRdi1b-lkp@intel.com/config)
> compiler: mips64-linux-gcc (GCC) 8.5.0
> sparse: v0.6.5-rc1
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260321/202603211216.YTKRdi1b-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/202603211216.YTKRdi1b-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
>    mips64-linux-ld: lib/math/div64.o: in function `mul_u64_add_u64_div_u64':
> >> div64.c:(.text.mul_u64_add_u64_div_u64+0x40): undefined reference to `__multi3'  
> 

I thought someone was going to change the #if so that __multi3 was defined
for compilers after (IIRC) 7.1 until at (also IIRC) 10.5.
But for __mips why worry that much - the function is quite small.
Just enable it unconditionally.

While this code only wants the 128bit product of two 64bit integers
(which is a single instruction) the full 128x128 product looks
faster than the fallback code that uses 32bit multiples.

More interesting is sparc64 - where __multi3 can also get called.
That function looks horrid - I presume it is carefully optimised!
Without any comment it is hard to see what it is doing.
(Not helped by me only knowing sparc32 from 1988.)

	David


      reply	other threads:[~2026-03-21  9:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-21  4:48 div64.c:(.text.mul_u64_add_u64_div_u64+0x40): undefined reference to `__multi3' kernel test robot
2026-03-21  9:24 ` David Laight [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260321092414.542ad642@pumpkin \
    --to=david.laight.linux@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=npitre@baylibre.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox