From: kernel test robot <lkp@intel.com>
To: "wuqiang.matt" <wuqiang.matt@bytedance.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
"Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Subject: [linux-next:master 14180/15478] lib/objpool.c:169:12: error: call to undeclared function 'arch_cmpxchg_local'; ISO C99 and later do not support implicit function declarations
Date: Fri, 27 Oct 2023 22:18:54 +0800 [thread overview]
Message-ID: <202310272207.tLPflya4-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 66f1e1ea3548378ff6387b1ce0b40955d54e86aa
commit: 49c19389876002dc46d0c1344c056a6366745d07 [14180/15478] lib,kprobes: using try_cmpxchg_local in objpool_push
config: hexagon-randconfig-r016-20230107 (https://download.01.org/0day-ci/archive/20231027/202310272207.tLPflya4-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231027/202310272207.tLPflya4-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/202310272207.tLPflya4-lkp@intel.com/
All errors (new ones prefixed by >>):
>> lib/objpool.c:169:12: error: call to undeclared function 'arch_cmpxchg_local'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
} while (!try_cmpxchg_local(&slot->tail, &tail, tail + 1));
^
include/linux/atomic/atomic-instrumented.h:4980:2: note: expanded from macro 'try_cmpxchg_local'
raw_try_cmpxchg_local(__ai_ptr, __ai_oldp, __VA_ARGS__); \
^
include/linux/atomic/atomic-arch-fallback.h:392:9: note: expanded from macro 'raw_try_cmpxchg_local'
___r = raw_cmpxchg_local((_ptr), ___o, (_new)); \
^
include/linux/atomic/atomic-arch-fallback.h:384:27: note: expanded from macro 'raw_cmpxchg_local'
#define raw_cmpxchg_local arch_cmpxchg_local
^
1 error generated.
vim +/arch_cmpxchg_local +169 lib/objpool.c
154
155 /* adding object to slot, abort if the slot was already full */
156 static inline int
157 objpool_try_add_slot(void *obj, struct objpool_head *pool, int cpu)
158 {
159 struct objpool_slot *slot = pool->cpu_slots[cpu];
160 uint32_t head, tail;
161
162 /* loading tail and head as a local snapshot, tail first */
163 tail = READ_ONCE(slot->tail);
164
165 do {
166 head = READ_ONCE(slot->head);
167 /* fault caught: something must be wrong */
168 WARN_ON_ONCE(tail - head > pool->nr_objs);
> 169 } while (!try_cmpxchg_local(&slot->tail, &tail, tail + 1));
170
171 /* now the tail position is reserved for the given obj */
172 WRITE_ONCE(slot->entries[tail & slot->mask], obj);
173 /* update sequence to make this obj available for pop() */
174 smp_store_release(&slot->last, tail + 1);
175
176 return 0;
177 }
178
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-10-27 14:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202310272207.tLPflya4-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-mm@kvack.org \
--cc=llvm@lists.linux.dev \
--cc=mhiramat@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=wuqiang.matt@bytedance.com \
/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.