From: kernel test robot <lkp@intel.com>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [linux-next:master 2555/3220] arch/csky/include/asm/cmpxchg.h:138:25: error: implicit declaration of function 'cmpxchg_emu_u8'
Date: Tue, 2 Apr 2024 21:15:39 +0800 [thread overview]
Message-ID: <202404022106.mYwpypit-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: c0b832517f627ead3388c6f0c74e8ac10ad5774b
commit: ea7f9bb7268e89fff8590ab5a360f5b27a0fc19a [2555/3220] csky: Emulate one-byte and two-byte cmpxchg
config: csky-randconfig-r012-20230202 (https://download.01.org/0day-ci/archive/20240402/202404022106.mYwpypit-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240402/202404022106.mYwpypit-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/202404022106.mYwpypit-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from arch/csky/include/asm/atomic.h:9,
from include/linux/atomic.h:7,
from include/asm-generic/bitops/lock.h:5,
from arch/csky/include/asm/bitops.h:69,
from include/linux/bitops.h:68,
from include/linux/log2.h:12,
from kernel/bounds.c:13:
include/linux/atomic/atomic-arch-fallback.h: In function 'raw_atomic_cmpxchg':
>> arch/csky/include/asm/cmpxchg.h:138:25: error: implicit declaration of function 'cmpxchg_emu_u8' [-Werror=implicit-function-declaration]
138 | __ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \
| ^~~~~~~~~~~~~~
arch/csky/include/asm/cmpxchg.h:165:10: note: in expansion of macro '__cmpxchg'
165 | (__cmpxchg((ptr), (o), (n), sizeof(*(ptr))))
| ^~~~~~~~~
include/linux/atomic/atomic-arch-fallback.h:55:21: note: in expansion of macro 'arch_cmpxchg'
55 | #define raw_cmpxchg arch_cmpxchg
| ^~~~~~~~~~~~
include/linux/atomic/atomic-arch-fallback.h:2026:16: note: in expansion of macro 'raw_cmpxchg'
2026 | return raw_cmpxchg(&v->counter, old, new);
| ^~~~~~~~~~~
>> arch/csky/include/asm/cmpxchg.h:141:25: error: implicit declaration of function 'cmpxchg_emu_u16' [-Werror=implicit-function-declaration]
141 | __ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \
| ^~~~~~~~~~~~~~~
arch/csky/include/asm/cmpxchg.h:165:10: note: in expansion of macro '__cmpxchg'
165 | (__cmpxchg((ptr), (o), (n), sizeof(*(ptr))))
| ^~~~~~~~~
include/linux/atomic/atomic-arch-fallback.h:55:21: note: in expansion of macro 'arch_cmpxchg'
55 | #define raw_cmpxchg arch_cmpxchg
| ^~~~~~~~~~~~
include/linux/atomic/atomic-arch-fallback.h:2026:16: note: in expansion of macro 'raw_cmpxchg'
2026 | return raw_cmpxchg(&v->counter, 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 +138 arch/csky/include/asm/cmpxchg.h
125
126 #define arch_cmpxchg_acquire(ptr, o, n) \
127 (__cmpxchg_acquire((ptr), (o), (n), sizeof(*(ptr))))
128
129 #define __cmpxchg(ptr, old, new, size) \
130 ({ \
131 __typeof__(ptr) __ptr = (ptr); \
132 __typeof__(new) __new = (new); \
133 __typeof__(new) __tmp; \
134 __typeof__(old) __old = (old); \
135 __typeof__(*(ptr)) __ret; \
136 switch (size) { \
137 case 1: \
> 138 __ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \
139 break; \
140 case 2: \
> 141 __ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \
142 break; \
143 case 4: \
144 asm volatile ( \
145 RELEASE_FENCE \
146 "1: ldex.w %0, (%3) \n" \
147 " cmpne %0, %4 \n" \
148 " bt 2f \n" \
149 " mov %1, %2 \n" \
150 " stex.w %1, (%3) \n" \
151 " bez %1, 1b \n" \
152 FULL_FENCE \
153 "2: \n" \
154 : "=&r" (__ret), "=&r" (__tmp) \
155 : "r" (__new), "r"(__ptr), "r"(__old) \
156 :); \
157 break; \
158 default: \
159 BUILD_BUG(); \
160 } \
161 __ret; \
162 })
163
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2024-04-02 13:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-02 13:15 kernel test robot [this message]
2024-04-02 17:26 ` [linux-next:master 2555/3220] arch/csky/include/asm/cmpxchg.h:138:25: error: implicit declaration of function 'cmpxchg_emu_u8' Paul E. McKenney
2024-04-03 7:16 ` Yujie Liu
2024-04-03 22:20 ` 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=202404022106.mYwpypit-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-mm@kvack.org \
--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;
as well as URLs for NNTP newsgroup(s).