* [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
@ 2023-10-27 14:18 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-10-27 14:18 UTC (permalink / raw)
To: wuqiang.matt
Cc: llvm, oe-kbuild-all, Linux Memory Management List,
Masami Hiramatsu (Google)
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-10-27 14:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-27 14:18 [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 kernel test robot
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.