mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yujie Liu <yujie.liu@intel.com>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: kernel test robot <lkp@intel.com>,
	<oe-kbuild-all@lists.linux.dev>, <linux-kernel@vger.kernel.org>
Subject: Re: [paulmck-rcu:dev.2024.05.18a 44/51] update.c:undefined reference to `cmpxchg_emu_u8'
Date: Wed, 29 May 2024 15:54:26 +0800	[thread overview]
Message-ID: <ZlbfMhpMmeGU+4aH@yujie-X299> (raw)
In-Reply-To: <df54d8ab-514d-409f-8522-b0790a12b953@paulmck-laptop>

On Tue, May 28, 2024 at 12:26:43PM -0700, Paul E. McKenney wrote:
> On Mon, May 27, 2024 at 01:25:58PM +0800, kernel test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2024.05.18a
> > head:   0e3eb8082184e066eb389f5e6f9c7b8c2d452d66
> > commit: c48887df74a95090e633a29ffbcef00b71cdab66 [44/51] rcu-tasks: Remove open-coded one-byte cmpxchg() emulation
> > config: um-allyesconfig (https://download.01.org/0day-ci/archive/20240527/202405271352.XYjxKyUi-lkp@intel.com/config)
> > compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240527/202405271352.XYjxKyUi-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/202405271352.XYjxKyUi-lkp@intel.com/
> > 
> > All errors (new ones prefixed by >>):
> > 
> >    /usr/bin/ld: kernel/rcu/update.o: in function `rcu_trc_cmpxchg_need_qs':
> > >> update.c:(.text+0x27d5): undefined reference to `cmpxchg_emu_u8'
> >    /usr/bin/ld: kernel/rcu/update.o: in function `trc_read_check_handler':
> >    update.c:(.text+0x2839): undefined reference to `cmpxchg_emu_u8'
> > >> /usr/bin/ld: update.c:(.text+0x2882): undefined reference to `cmpxchg_emu_u8'
> >    /usr/bin/ld: kernel/rcu/update.o: in function `trc_inspect_reader':
> >    update.c:(.text+0x52ce): undefined reference to `cmpxchg_emu_u8'
> >    /usr/bin/ld: update.c:(.text+0x5330): undefined reference to `cmpxchg_emu_u8'
> >    /usr/bin/ld: kernel/rcu/update.o:update.c:(.text+0x5933): more undefined references to `cmpxchg_emu_u8' follow
> > >> collect2: error: ld returned 1 exit status
> 
> Good catch!!!
> 
> Does the patch below clear this up?

The patch below will select ARCH_NEED_CMPXCHG_1_EMU by default on um
arch, so that cmpxchg-emu.o can be built, and it fixes the link error
for me.

Tested-by: Yujie Liu <yujie.liu@intel.com>

> 
> 							Thanx, Paul
> 
> ------------------------------------------------------------------------
> 
> commit 47450c70303a11da1bd650403844ad9e688f05a4
> Author: Paul E. McKenney <paulmck@kernel.org>
> Date:   Tue May 28 12:15:06 2024 -0700
> 
>     um: Emulate one-byte cmpxchg
>     
>     Use the new cmpxchg_emu_u8() to emulate one-byte cmpxchg() on um.
>     
>     Reported-by: kernel test robot <lkp@intel.com>
>     Closes: https://lore.kernel.org/all/202405271352.XYjxKyUi-lkp@intel.com/
>     Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
>     Cc: Richard Weinberger <richard@nod.at>
>     Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
>     Cc: Johannes Berg <johannes@sipsolutions.net>
>     Cc: <linux-um@lists.infradead.org>
> 
> diff --git a/arch/um/Kconfig b/arch/um/Kconfig
> index 93a5a8999b07e..5fc55e1d71122 100644
> --- a/arch/um/Kconfig
> +++ b/arch/um/Kconfig
> @@ -11,6 +11,7 @@ config UML
>  	select ARCH_HAS_KCOV
>  	select ARCH_HAS_STRNCPY_FROM_USER
>  	select ARCH_HAS_STRNLEN_USER
> +	select ARCH_NEED_CMPXCHG_1_EMU
>  	select ARCH_NO_PREEMPT
>  	select HAVE_ARCH_AUDITSYSCALL
>  	select HAVE_ARCH_KASAN if X86_64
> 

  reply	other threads:[~2024-05-29  8:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-27  5:25 kernel test robot
2024-05-28 19:26 ` Paul E. McKenney
2024-05-29  7:54   ` Yujie Liu [this message]
2024-05-29 17:26     ` Paul E. McKenney

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=ZlbfMhpMmeGU+4aH@yujie-X299 \
    --to=yujie.liu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=paulmck@kernel.org \
    /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

all inboxes | Powered by JetHome®