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.03.27b 64/69] arch/xtensa/include/asm/cmpxchg.h:77:25: error: implicit declaration of function 'cmpxchg_emu_u8'
Date: Sun, 31 Mar 2024 23:53:12 +0800 [thread overview]
Message-ID: <ZgmG6BR6TtejfQcC@yujie-X299> (raw)
In-Reply-To: <0303151f-c12e-4350-804a-11e3b734df91@paulmck-laptop>
On Fri, Mar 29, 2024 at 11:48:37AM -0700, Paul E. McKenney wrote:
> On Fri, Mar 29, 2024 at 11:08:04PM +0800, kernel test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2024.03.27b
> > head: 786fab3085d764055a78edb54023420920344333
> > commit: b3b1a154281fc97efc4c1d5818a83c29c228dbd5 [64/69] xtensa: Emulate one-byte and two-byte cmpxchg
> > config: xtensa-allnoconfig (https://download.01.org/0day-ci/archive/20240329/202403292321.T55etywH-lkp@intel.com/config)
> > compiler: xtensa-linux-gcc (GCC) 13.2.0
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240329/202403292321.T55etywH-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/202403292321.T55etywH-lkp@intel.com/
> >
> > All errors (new ones prefixed by >>):
> >
> > In file included from arch/xtensa/include/asm/atomic.h:19,
> > from include/linux/atomic.h:7,
> > from include/asm-generic/bitops/atomic.h:5,
> > from arch/xtensa/include/asm/bitops.h:192,
> > from include/linux/bitops.h:68,
> > from include/linux/log2.h:12,
> > from kernel/bounds.c:13:
> > arch/xtensa/include/asm/cmpxchg.h: In function '__cmpxchg':
> > >> arch/xtensa/include/asm/cmpxchg.h:77:25: error: implicit declaration of function 'cmpxchg_emu_u8' [-Werror=implicit-function-declaration]
> > 77 | case 1: return cmpxchg_emu_u8((volatile u8 *)ptr, old, new);
> > | ^~~~~~~~~~~~~~
>
> Good catch! Does the diff at the end fix this?
The error is fixed by the diff at the end.
Tested-by: Yujie Liu <yujie.liu@intel.com>
>
> Thanx, Paul
>
> > >> arch/xtensa/include/asm/cmpxchg.h:78:25: error: implicit declaration of function 'cmpxchg_emu_u16' [-Werror=implicit-function-declaration]
> > 78 | case 2: return cmpxchg_emu_u16((volatile u16 *)ptr, old, new);
> > | ^~~~~~~~~~~~~~~
> > cc1: some warnings being treated as errors
> > make[3]: *** [scripts/Makefile.build:117: kernel/bounds.s] Error 1
> > make[3]: Target 'prepare' not remade because of errors.
> > make[2]: *** [Makefile:1197: prepare0] Error 2
> > make[2]: Target 'prepare' not remade because of errors.
> > make[1]: *** [Makefile:240: __sub-make] Error 2
> > make[1]: Target 'prepare' not remade because of errors.
> > make: *** [Makefile:240: __sub-make] Error 2
> > make: Target 'prepare' not remade because of errors.
> >
> >
> > vim +/cmpxchg_emu_u8 +77 arch/xtensa/include/asm/cmpxchg.h
> >
> > 72
> > 73 static __inline__ unsigned long
> > 74 __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
> > 75 {
> > 76 switch (size) {
> > > 77 case 1: return cmpxchg_emu_u8((volatile u8 *)ptr, old, new);
> > > 78 case 2: return cmpxchg_emu_u16((volatile u16 *)ptr, old, new);
> > 79 case 4: return __cmpxchg_u32(ptr, old, new);
> > 80 default: __cmpxchg_called_with_bad_pointer();
> > 81 return old;
> > 82 }
> > 83 }
> > 84
> >
> > --
> > 0-DAY CI Kernel Test Service
> > https://github.com/intel/lkp-tests/wiki
>
> commit 663161aaa5c3286dcfc9ba2cd9e12170f9354ea7
> Author: Paul E. McKenney <paulmck@kernel.org>
> Date: Fri Mar 29 11:47:13 2024 -0700
>
> squash! xtensa: Emulate one-byte and two-byte cmpxchg
>
> [ paulmck: Apply kernel test robot feedback. ]
>
> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
>
> diff --git a/arch/xtensa/include/asm/cmpxchg.h b/arch/xtensa/include/asm/cmpxchg.h
> index bcce915a98e21..a0f9a2070209b 100644
> --- a/arch/xtensa/include/asm/cmpxchg.h
> +++ b/arch/xtensa/include/asm/cmpxchg.h
> @@ -15,6 +15,7 @@
>
> #include <linux/bits.h>
> #include <linux/stringify.h>
> +#include <linux/cmpxchg-emu.h>
>
> /*
> * cmpxchg
>
prev parent reply other threads:[~2024-03-31 15:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-29 15:08 kernel test robot
2024-03-29 18:48 ` Paul E. McKenney
2024-03-31 15:53 ` Yujie Liu [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=ZgmG6BR6TtejfQcC@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®