From: kernel test robot <lkp@intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
"Paul E. McKenney" <paulmck@kernel.org>
Subject: [rcu:rcu/next 35/35] kernel/rcu/tree.c:251:8: error: implicit declaration of function 'arch_atomic_add_return'; did you mean
Date: Thu, 25 Jun 2020 03:38:03 +0800 [thread overview]
Message-ID: <202006250300.ic32FsdY%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5571 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git rcu/next
head: 347acb93a34a6e4f312f8b9ec1afdb86d27858d2
commit: 347acb93a34a6e4f312f8b9ec1afdb86d27858d2 [35/35] rcu: Fixup noinstr warnings
config: mips-allyesconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 347acb93a34a6e4f312f8b9ec1afdb86d27858d2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
kernel/rcu/tree.c: In function 'rcu_dynticks_eqs_enter':
>> kernel/rcu/tree.c:251:8: error: implicit declaration of function 'arch_atomic_add_return'; did you mean 'atomic_add_return'? [-Werror=implicit-function-declaration]
251 | seq = arch_atomic_add_return(RCU_DYNTICK_CTRL_CTR, &rdp->dynticks);
| ^~~~~~~~~~~~~~~~~~~~~~
| atomic_add_return
kernel/rcu/tree.c: In function 'rcu_dynticks_eqs_exit':
>> kernel/rcu/tree.c:281:3: error: implicit declaration of function 'arch_atomic_andnot'; did you mean 'atomic_andnot'? [-Werror=implicit-function-declaration]
281 | arch_atomic_andnot(RCU_DYNTICK_CTRL_MASK, &rdp->dynticks);
| ^~~~~~~~~~~~~~~~~~
| atomic_andnot
kernel/rcu/tree.c: In function 'rcu_dynticks_curr_cpu_in_eqs':
>> kernel/rcu/tree.c:314:11: error: implicit declaration of function 'arch_atomic_read'; did you mean 'atomic_read'? [-Werror=implicit-function-declaration]
314 | return !(arch_atomic_read(&rdp->dynticks) & RCU_DYNTICK_CTRL_CTR);
| ^~~~~~~~~~~~~~~~
| atomic_read
cc1: some warnings being treated as errors
vim +251 kernel/rcu/tree.c
233
234 /*
235 * Record entry into an extended quiescent state. This is only to be
236 * called when not already in an extended quiescent state, that is,
237 * RCU is watching prior to the call to this function and is no longer
238 * watching upon return.
239 */
240 static noinstr void rcu_dynticks_eqs_enter(void)
241 {
242 struct rcu_data *rdp = this_cpu_ptr(&rcu_data);
243 int seq;
244
245 /*
246 * CPUs seeing atomic_add_return() must see prior RCU read-side
247 * critical sections, and we also must force ordering with the
248 * next idle sojourn.
249 */
250 rcu_dynticks_task_trace_enter(); // Before ->dynticks update!
> 251 seq = arch_atomic_add_return(RCU_DYNTICK_CTRL_CTR, &rdp->dynticks);
252 // RCU is no longer watching. Better be in extended quiescent state!
253 WARN_ON_ONCE(IS_ENABLED(CONFIG_RCU_EQS_DEBUG) &&
254 (seq & RCU_DYNTICK_CTRL_CTR));
255 /* Better not have special action (TLB flush) pending! */
256 WARN_ON_ONCE(IS_ENABLED(CONFIG_RCU_EQS_DEBUG) &&
257 (seq & RCU_DYNTICK_CTRL_MASK));
258 }
259
260 /*
261 * Record exit from an extended quiescent state. This is only to be
262 * called from an extended quiescent state, that is, RCU is not watching
263 * prior to the call to this function and is watching upon return.
264 */
265 static noinstr void rcu_dynticks_eqs_exit(void)
266 {
267 struct rcu_data *rdp = this_cpu_ptr(&rcu_data);
268 int seq;
269
270 /*
271 * CPUs seeing atomic_add_return() must see prior idle sojourns,
272 * and we also must force ordering with the next RCU read-side
273 * critical section.
274 */
275 seq = arch_atomic_add_return(RCU_DYNTICK_CTRL_CTR, &rdp->dynticks);
276 // RCU is now watching. Better not be in an extended quiescent state!
277 rcu_dynticks_task_trace_exit(); // After ->dynticks update!
278 WARN_ON_ONCE(IS_ENABLED(CONFIG_RCU_EQS_DEBUG) &&
279 !(seq & RCU_DYNTICK_CTRL_CTR));
280 if (seq & RCU_DYNTICK_CTRL_MASK) {
> 281 arch_atomic_andnot(RCU_DYNTICK_CTRL_MASK, &rdp->dynticks);
282 smp_mb__after_atomic(); /* _exit after clearing mask. */
283 }
284 }
285
286 /*
287 * Reset the current CPU's ->dynticks counter to indicate that the
288 * newly onlined CPU is no longer in an extended quiescent state.
289 * This will either leave the counter unchanged, or increment it
290 * to the next non-quiescent value.
291 *
292 * The non-atomic test/increment sequence works because the upper bits
293 * of the ->dynticks counter are manipulated only by the corresponding CPU,
294 * or when the corresponding CPU is offline.
295 */
296 static void rcu_dynticks_eqs_online(void)
297 {
298 struct rcu_data *rdp = this_cpu_ptr(&rcu_data);
299
300 if (atomic_read(&rdp->dynticks) & RCU_DYNTICK_CTRL_CTR)
301 return;
302 atomic_add(RCU_DYNTICK_CTRL_CTR, &rdp->dynticks);
303 }
304
305 /*
306 * Is the current CPU in an extended quiescent state?
307 *
308 * No ordering, as we are sampling CPU-local information.
309 */
310 static __always_inline bool rcu_dynticks_curr_cpu_in_eqs(void)
311 {
312 struct rcu_data *rdp = this_cpu_ptr(&rcu_data);
313
> 314 return !(arch_atomic_read(&rdp->dynticks) & RCU_DYNTICK_CTRL_CTR);
315 }
316
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 67048 bytes --]
next reply other threads:[~2020-06-24 19:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-24 19:38 kernel test robot [this message]
2020-06-24 20:30 ` [rcu:rcu/next 35/35] kernel/rcu/tree.c:251:8: error: implicit declaration of function 'arch_atomic_add_return'; did you mean Paul E. McKenney
2020-06-25 9:55 ` Marco Elver
2020-06-25 11:29 ` Peter Zijlstra
2020-06-25 14:11 ` Peter Zijlstra
2020-06-25 15:38 ` Paul E. McKenney
2020-06-25 19:35 ` Marco Elver
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=202006250300.ic32FsdY%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.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).