All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Laight <david.laight.linux@gmail.com>
To: Dinh Nguyen <dinguyen@kernel.org>
Cc: "Arnd Bergmann" <arnd@arndb.de>,
	"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
	"schuster.simon@siemens-energy.com"
	<schuster.simon@siemens-energy.com>,
	"Ley Foon Tan" <lftan@altera.com>,
	linux-kernel@vger.kernel.org, "kernel test robot" <lkp@intel.com>,
	linux-snps-arc@lists.infradead.org, linux-parisc@vger.kernel.org,
	"linux-openrisc@vger.kernel.org" <linux-openrisc@vger.kernel.org>
Subject: Re: [PATCH] nios2: ksyms: Declare __mulsi3 export
Date: Tue, 20 Oct 2026 10:40:48 +0100	[thread overview]
Message-ID: <20261020104048.7b038bdd@pumpkin> (raw)
In-Reply-To: <c32b7ed2-fa3f-4a58-9300-21efcc88f056@kernel.org>

On Mon, 19 Oct 2026 09:34:42 -0500
Dinh Nguyen <dinguyen@kernel.org> wrote:

> On 10/19/26 06:16, Arnd Bergmann wrote:
> > On Mon, Oct 19, 2026, at 11:49, Thomas Weißschuh wrote:  
> >> GCC may emit libcalls to __mulsi3(). As modpost is not aware that this
> >> function is provided through the linked in libgcc, it fails:
> >>
> >> ERROR: modpost: kernel/locking/test-ww_mutex.ko: symbol '__mulsi3' undefined!
> >> ERROR: modpost: kernel/time/test_udelay.ko: symbol '__mulsi3' undefined!
> >> ERROR: modpost: kernel/resource_kunit.ko: symbol '__mulsi3' undefined!
> >> ERROR: modpost: fs/fuse/virtiofs.ko: symbol '__mulsi3' undefined!
> >> etc.
> >>
> >> Make sure modpost can see the symbol from libgcc.
> >>
> >> Reported-by: kernel test robot <lkp@intel.com>
> >> Closes:
> >> https://lore.kernel.org/oe-kbuild-all/202610171933.J4bFOfL8-lkp@intel.com/
> >> Fixes: 2fc8483fdcde ("nios2: Build infrastructure")
> >> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>  
> > 
> > Acked-by: Arnd Bergmann <arnd@arndb.de>
> > 
> > The patch looks correct to me, but it would also be nice to not use
> > libgcc at all. What I see is that only arc, nios2, openrisc and
> > parisc still link against the toolchain-provided libgcc, everything
> > else uses the kernel's own runtime.
> > 
> > It's probably not even that hard to do right, here is what I found
> > is imported from libgcc.
> >   
> Patch applied!
> 
> Thanks for the suggestion Arnd, I'll work to on the NIOS2.

Does the kernel support nios2 that don't have the optional multiply
instructions? (including the ones that generate the high 32 bits).

If the compiler knows they exist (it isn't the default) then it should
just use them.
The fpga almost certainly have plenty of 18x18 DSP multiplier blocks
than can be used - so the resources are there.
(The slow part of the multiply is actually the ripple adder that
generates the high 46 bits.)

David 

> 
> Dinh
> 


WARNING: multiple messages have this Message-ID (diff)
From: David Laight <david.laight.linux@gmail.com>
To: Dinh Nguyen <dinguyen@kernel.org>
Cc: "Arnd Bergmann" <arnd@arndb.de>,
	"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
	"schuster.simon@siemens-energy.com"
	<schuster.simon@siemens-energy.com>,
	"Ley Foon Tan" <lftan@altera.com>,
	linux-kernel@vger.kernel.org, "kernel test robot" <lkp@intel.com>,
	linux-snps-arc@lists.infradead.org, linux-parisc@vger.kernel.org,
	"linux-openrisc@vger.kernel.org" <linux-openrisc@vger.kernel.org>
Subject: Re: [PATCH] nios2: ksyms: Declare __mulsi3 export
Date: Tue, 20 Oct 2026 10:40:48 +0100	[thread overview]
Message-ID: <20261020104048.7b038bdd@pumpkin> (raw)
In-Reply-To: <c32b7ed2-fa3f-4a58-9300-21efcc88f056@kernel.org>

On Mon, 19 Oct 2026 09:34:42 -0500
Dinh Nguyen <dinguyen@kernel.org> wrote:

> On 10/19/26 06:16, Arnd Bergmann wrote:
> > On Mon, Oct 19, 2026, at 11:49, Thomas Weißschuh wrote:  
> >> GCC may emit libcalls to __mulsi3(). As modpost is not aware that this
> >> function is provided through the linked in libgcc, it fails:
> >>
> >> ERROR: modpost: kernel/locking/test-ww_mutex.ko: symbol '__mulsi3' undefined!
> >> ERROR: modpost: kernel/time/test_udelay.ko: symbol '__mulsi3' undefined!
> >> ERROR: modpost: kernel/resource_kunit.ko: symbol '__mulsi3' undefined!
> >> ERROR: modpost: fs/fuse/virtiofs.ko: symbol '__mulsi3' undefined!
> >> etc.
> >>
> >> Make sure modpost can see the symbol from libgcc.
> >>
> >> Reported-by: kernel test robot <lkp@intel.com>
> >> Closes:
> >> https://lore.kernel.org/oe-kbuild-all/202610171933.J4bFOfL8-lkp@intel.com/
> >> Fixes: 2fc8483fdcde ("nios2: Build infrastructure")
> >> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>  
> > 
> > Acked-by: Arnd Bergmann <arnd@arndb.de>
> > 
> > The patch looks correct to me, but it would also be nice to not use
> > libgcc at all. What I see is that only arc, nios2, openrisc and
> > parisc still link against the toolchain-provided libgcc, everything
> > else uses the kernel's own runtime.
> > 
> > It's probably not even that hard to do right, here is what I found
> > is imported from libgcc.
> >   
> Patch applied!
> 
> Thanks for the suggestion Arnd, I'll work to on the NIOS2.

Does the kernel support nios2 that don't have the optional multiply
instructions? (including the ones that generate the high 32 bits).

If the compiler knows they exist (it isn't the default) then it should
just use them.
The fpga almost certainly have plenty of 18x18 DSP multiplier blocks
than can be used - so the resources are there.
(The slow part of the multiply is actually the ripple adder that
generates the high 46 bits.)

David 

> 
> Dinh
> 


_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

  reply	other threads:[~2026-10-20  9:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20261019-nios2-mulsi3-v1-1-4fd75b1bacef@linutronix.de>
2026-10-19 11:16 ` [PATCH] nios2: ksyms: Declare __mulsi3 export Arnd Bergmann
2026-10-19 11:16   ` Arnd Bergmann
2026-10-19 14:34   ` Dinh Nguyen
2026-10-19 14:34     ` Dinh Nguyen
2026-10-20  9:40     ` David Laight [this message]
2026-10-20  9:40       ` David Laight

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=20261020104048.7b038bdd@pumpkin \
    --to=david.laight.linux@gmail.com \
    --cc=arnd@arndb.de \
    --cc=dinguyen@kernel.org \
    --cc=lftan@altera.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-openrisc@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=lkp@intel.com \
    --cc=schuster.simon@siemens-energy.com \
    --cc=thomas.weissschuh@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.