[rcu:rcu/next 18/18] kernel/rcu/tree.c:1347:4: error: implicit declaration of function 'irq_work_queue_on'
From: kbuild test robot
Date: Thu Aug 17 2017 - 21:14:33 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git rcu/next
head: 2679cfaafa4cf7cb7aad3de8ec5d54fb295c1c5e
commit: 2679cfaafa4cf7cb7aad3de8ec5d54fb295c1c5e [18/18] rcu: Make RCU CPU stall warnings check for irq-disabled CPUs
config: x86_64-randconfig-x000-201733 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
git checkout 2679cfaafa4cf7cb7aad3de8ec5d54fb295c1c5e
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
kernel/rcu/tree.c: In function 'rcu_implicit_dynticks_qs':
>> kernel/rcu/tree.c:1347:4: error: implicit declaration of function 'irq_work_queue_on' [-Werror=implicit-function-declaration]
irq_work_queue_on(&rdp->rcu_iw, rdp->cpu);
^~~~~~~~~~~~~~~~~
In file included from include/uapi/linux/stddef.h:1:0,
from include/linux/stddef.h:4,
from include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from kernel/rcu/tree.c:30:
kernel/rcu/tree.c: At top level:
include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'strcpy' which is not static
______f = { \
^
include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
^~~~~~~~~~
include/linux/string.h:390:2: note: in expansion of macro 'if'
if (p_size == (size_t)-1 && q_size == (size_t)-1)
^~
include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'kmemdup' which is not static
______f = { \
^
include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
^~~~~~~~~~
include/linux/string.h:380:2: note: in expansion of macro 'if'
if (p_size < size)
^~
include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'kmemdup' which is not static
______f = { \
^
include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
^~~~~~~~~~
include/linux/string.h:378:2: note: in expansion of macro 'if'
if (__builtin_constant_p(size) && p_size < size)
^~
include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memchr_inv' which is not static
______f = { \
^
include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
^~~~~~~~~~
include/linux/string.h:369:2: note: in expansion of macro 'if'
if (p_size < size)
^~
include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memchr_inv' which is not static
______f = { \
^
include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
^~~~~~~~~~
include/linux/string.h:367:2: note: in expansion of macro 'if'
if (__builtin_constant_p(size) && p_size < size)
^~
include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memchr' which is not static
______f = { \
^
include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
^~~~~~~~~~
include/linux/string.h:358:2: note: in expansion of macro 'if'
if (p_size < size)
^~
include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memchr' which is not static
______f = { \
^
include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
^~~~~~~~~~
include/linux/string.h:356:2: note: in expansion of macro 'if'
if (__builtin_constant_p(size) && p_size < size)
^~
include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static
______f = { \
^
include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
^~~~~~~~~~
include/linux/string.h:348:2: note: in expansion of macro 'if'
if (p_size < size || q_size < size)
^~
include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static
______f = { \
^
include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
^~~~~~~~~~
include/linux/string.h:345:3: note: in expansion of macro 'if'
if (q_size < size)
^~
include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static
______f = { \
^
include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
^~~~~~~~~~
include/linux/string.h:343:3: note: in expansion of macro 'if'
if (p_size < size)
^~
include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static
vim +/irq_work_queue_on +1347 kernel/rcu/tree.c
1251
1252 /*
1253 * Return true if the specified CPU has passed through a quiescent
1254 * state by virtue of being in or having passed through an dynticks
1255 * idle state since the last call to dyntick_save_progress_counter()
1256 * for this same CPU, or by virtue of having been offline.
1257 */
1258 static int rcu_implicit_dynticks_qs(struct rcu_data *rdp)
1259 {
1260 unsigned long jtsq;
1261 bool *rnhqp;
1262 bool *ruqp;
1263 struct rcu_node *rnp = rdp->mynode;
1264
1265 /*
1266 * If the CPU passed through or entered a dynticks idle phase with
1267 * no active irq/NMI handlers, then we can safely pretend that the CPU
1268 * already acknowledged the request to pass through a quiescent
1269 * state. Either way, that CPU cannot possibly be in an RCU
1270 * read-side critical section that started before the beginning
1271 * of the current RCU grace period.
1272 */
1273 if (rcu_dynticks_in_eqs_since(rdp->dynticks, rdp->dynticks_snap)) {
1274 trace_rcu_fqs(rdp->rsp->name, rdp->gpnum, rdp->cpu, TPS("dti"));
1275 rdp->dynticks_fqs++;
1276 rcu_gpnum_ovf(rnp, rdp);
1277 return 1;
1278 }
1279
1280 /*
1281 * Has this CPU encountered a cond_resched_rcu_qs() since the
1282 * beginning of the grace period? For this to be the case,
1283 * the CPU has to have noticed the current grace period. This
1284 * might not be the case for nohz_full CPUs looping in the kernel.
1285 */
1286 jtsq = jiffies_till_sched_qs;
1287 ruqp = per_cpu_ptr(&rcu_dynticks.rcu_urgent_qs, rdp->cpu);
1288 if (time_after(jiffies, rdp->rsp->gp_start + jtsq) &&
1289 READ_ONCE(rdp->rcu_qs_ctr_snap) != per_cpu(rcu_dynticks.rcu_qs_ctr, rdp->cpu) &&
1290 READ_ONCE(rdp->gpnum) == rnp->gpnum && !rdp->gpwrap) {
1291 trace_rcu_fqs(rdp->rsp->name, rdp->gpnum, rdp->cpu, TPS("rqc"));
1292 rcu_gpnum_ovf(rnp, rdp);
1293 return 1;
1294 } else if (time_after(jiffies, rdp->rsp->gp_start + jtsq)) {
1295 /* Load rcu_qs_ctr before store to rcu_urgent_qs. */
1296 smp_store_release(ruqp, true);
1297 }
1298
1299 /* Check for the CPU being offline. */
1300 if (!(rdp->grpmask & rcu_rnp_online_cpus(rnp))) {
1301 trace_rcu_fqs(rdp->rsp->name, rdp->gpnum, rdp->cpu, TPS("ofl"));
1302 rdp->offline_fqs++;
1303 rcu_gpnum_ovf(rnp, rdp);
1304 return 1;
1305 }
1306
1307 /*
1308 * A CPU running for an extended time within the kernel can
1309 * delay RCU grace periods. When the CPU is in NO_HZ_FULL mode,
1310 * even context-switching back and forth between a pair of
1311 * in-kernel CPU-bound tasks cannot advance grace periods.
1312 * So if the grace period is old enough, make the CPU pay attention.
1313 * Note that the unsynchronized assignments to the per-CPU
1314 * rcu_need_heavy_qs variable are safe. Yes, setting of
1315 * bits can be lost, but they will be set again on the next
1316 * force-quiescent-state pass. So lost bit sets do not result
1317 * in incorrect behavior, merely in a grace period lasting
1318 * a few jiffies longer than it might otherwise. Because
1319 * there are at most four threads involved, and because the
1320 * updates are only once every few jiffies, the probability of
1321 * lossage (and thus of slight grace-period extension) is
1322 * quite low.
1323 */
1324 rnhqp = &per_cpu(rcu_dynticks.rcu_need_heavy_qs, rdp->cpu);
1325 if (!READ_ONCE(*rnhqp) &&
1326 (time_after(jiffies, rdp->rsp->gp_start + jtsq) ||
1327 time_after(jiffies, rdp->rsp->jiffies_resched))) {
1328 WRITE_ONCE(*rnhqp, true);
1329 /* Store rcu_need_heavy_qs before rcu_urgent_qs. */
1330 smp_store_release(ruqp, true);
1331 rdp->rsp->jiffies_resched += jtsq; /* Re-enable beating. */
1332 }
1333
1334 /*
1335 * If more than halfway to RCU CPU stall-warning time, do a
1336 * resched_cpu() to try to loosen things up a bit. Also check to
1337 * see if the CPU is getting hammered with interrupts, but only
1338 * once per grace period, just to keep the IPIs down to a dull roar.
1339 */
1340 if (jiffies - rdp->rsp->gp_start > rcu_jiffies_till_stall_check() / 2) {
1341 resched_cpu(rdp->cpu);
1342 if (!rdp->rcu_iw_pending && rdp->rcu_iw_gpnum != rnp->gpnum &&
1343 cpu_online(rdp->cpu)) {
1344 init_irq_work(&rdp->rcu_iw, rcu_iw_handler);
1345 rdp->rcu_iw_pending = true;
1346 rdp->rcu_iw_gpnum = rnp->gpnum;
> 1347 irq_work_queue_on(&rdp->rcu_iw, rdp->cpu);
1348 }
1349 }
1350
1351 return 0;
1352 }
1353
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip