tree: https://github.com/ammarfaizi2/linux-block paulmck/linux-rcu/dev head: 7831c47ed19bac29a16088dc2511c9df012ff128 commit: 7831c47ed19bac29a16088dc2511c9df012ff128 [48/48] rcu: Make SRCU mandatory config: m68k-allyesconfig compiler: m68k-linux-gcc (GCC) 12.1.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 # https://github.com/ammarfaizi2/linux-block/commit/7831c47ed19bac29a16088dc2511c9df012ff128 git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block git fetch --no-tags ammarfaizi2-block paulmck/linux-rcu/dev git checkout 7831c47ed19bac29a16088dc2511c9df012ff128 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash kernel/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from kernel/rcu/update.c:605: kernel/rcu/tasks.h: In function 'cblist_init_generic': kernel/rcu/tasks.h:256:17: error: implicit declaration of function 'raw_spin_lock_rcu_node'; did you mean 'raw_spin_lock_nested'? [-Werror=implicit-function-declaration] 256 | raw_spin_lock_rcu_node(rtpcp); // irqs already disabled. | ^~~~~~~~~~~~~~~~~~~~~~ | raw_spin_lock_nested kernel/rcu/tasks.h:264:17: error: implicit declaration of function 'raw_spin_unlock_rcu_node'; did you mean 'raw_spin_unlock_irqrestore'? [-Werror=implicit-function-declaration] 264 | raw_spin_unlock_rcu_node(rtpcp); // irqs remain disabled. | ^~~~~~~~~~~~~~~~~~~~~~~~ | raw_spin_unlock_irqrestore kernel/rcu/tasks.h: In function 'call_rcu_tasks_generic': kernel/rcu/tasks.h:299:14: error: implicit declaration of function 'raw_spin_trylock_rcu_node'; did you mean 'raw_spin_trylock_irqsave'? [-Werror=implicit-function-declaration] 299 | if (!raw_spin_trylock_rcu_node(rtpcp)) { // irqs already disabled. | ^~~~~~~~~~~~~~~~~~~~~~~~~ | raw_spin_trylock_irqsave kernel/rcu/tasks.h:317:9: error: implicit declaration of function 'raw_spin_unlock_irqrestore_rcu_node'; did you mean 'raw_spin_unlock_irqrestore'? [-Werror=implicit-function-declaration] 317 | raw_spin_unlock_irqrestore_rcu_node(rtpcp, flags); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | raw_spin_unlock_irqrestore kernel/rcu/tasks.h: In function 'rcu_barrier_tasks_generic': kernel/rcu/tasks.h:369:17: error: implicit declaration of function 'raw_spin_lock_irqsave_rcu_node'; did you mean 'raw_spin_lock_irqsave_nested'? [-Werror=implicit-function-declaration] 369 | raw_spin_lock_irqsave_rcu_node(rtpcp, flags); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | raw_spin_lock_irqsave_nested kernel/rcu/tasks.h: In function 'rcu_tasks_trace_pregp_step': >> kernel/rcu/tasks.h:1511:17: warning: 'flags' is used uninitialized [-Wuninitialized] 1511 | raw_spin_lock_irqsave_rcu_node(rtpcp, flags); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/rcu/tasks.h:1482:23: note: 'flags' was declared here 1482 | unsigned long flags; | ^~~~~ cc1: some warnings being treated as errors vim +/flags +1511 kernel/rcu/tasks.h d5f177d35c2442 Paul E. McKenney 2020-03-09 1476 1fa98e2e40e5a4 Paul E. McKenney 2022-05-17 1477 /* Initialize for a new RCU-tasks-trace grace period. */ 7460ade1fc6e3f Paul E. McKenney 2022-05-18 1478 static void rcu_tasks_trace_pregp_step(struct list_head *hop) 1fa98e2e40e5a4 Paul E. McKenney 2022-05-17 1479 { dc7d54b45170e1 Paul E. McKenney 2022-05-18 1480 LIST_HEAD(blkd_tasks); 1fa98e2e40e5a4 Paul E. McKenney 2022-05-17 1481 int cpu; dc7d54b45170e1 Paul E. McKenney 2022-05-18 1482 unsigned long flags; dc7d54b45170e1 Paul E. McKenney 2022-05-18 1483 struct rcu_tasks_percpu *rtpcp; dc7d54b45170e1 Paul E. McKenney 2022-05-18 1484 struct task_struct *t; 1fa98e2e40e5a4 Paul E. McKenney 2022-05-17 1485 1fa98e2e40e5a4 Paul E. McKenney 2022-05-17 1486 // There shouldn't be any old IPIs, but... 1fa98e2e40e5a4 Paul E. McKenney 2022-05-17 1487 for_each_possible_cpu(cpu) 1fa98e2e40e5a4 Paul E. McKenney 2022-05-17 1488 WARN_ON_ONCE(per_cpu(trc_ipi_to_cpu, cpu)); 1fa98e2e40e5a4 Paul E. McKenney 2022-05-17 1489 eea3423b162d5d Paul E. McKenney 2022-06-06 1490 // Disable CPU hotplug across the CPU scan for the benefit of eea3423b162d5d Paul E. McKenney 2022-06-06 1491 // any IPIs that might be needed. This also waits for all readers eea3423b162d5d Paul E. McKenney 2022-06-06 1492 // in CPU-hotplug code paths. 1fa98e2e40e5a4 Paul E. McKenney 2022-05-17 1493 cpus_read_lock(); 7460ade1fc6e3f Paul E. McKenney 2022-05-18 1494 eea3423b162d5d Paul E. McKenney 2022-06-06 1495 // These rcu_tasks_trace_pertask_prep() calls are serialized to 7460ade1fc6e3f Paul E. McKenney 2022-05-18 1496 // allow safe access to the hop list. e386b6725798ee Paul E. McKenney 2022-06-02 1497 for_each_online_cpu(cpu) { e386b6725798ee Paul E. McKenney 2022-06-02 1498 rcu_read_lock(); e386b6725798ee Paul E. McKenney 2022-06-02 1499 t = cpu_curr_snapshot(cpu); e386b6725798ee Paul E. McKenney 2022-06-02 1500 if (rcu_tasks_trace_pertask_prep(t, true)) e386b6725798ee Paul E. McKenney 2022-06-02 1501 trc_add_holdout(t, hop); e386b6725798ee Paul E. McKenney 2022-06-02 1502 rcu_read_unlock(); d6ad60635cafe9 Paul E. McKenney 2022-07-18 1503 cond_resched_tasks_rcu_qs(); e386b6725798ee Paul E. McKenney 2022-06-02 1504 } dc7d54b45170e1 Paul E. McKenney 2022-05-18 1505 dc7d54b45170e1 Paul E. McKenney 2022-05-18 1506 // Only after all running tasks have been accounted for is it dc7d54b45170e1 Paul E. McKenney 2022-05-18 1507 // safe to take care of the tasks that have blocked within their dc7d54b45170e1 Paul E. McKenney 2022-05-18 1508 // current RCU tasks trace read-side critical section. dc7d54b45170e1 Paul E. McKenney 2022-05-18 1509 for_each_possible_cpu(cpu) { dc7d54b45170e1 Paul E. McKenney 2022-05-18 1510 rtpcp = per_cpu_ptr(rcu_tasks_trace.rtpcpu, cpu); dc7d54b45170e1 Paul E. McKenney 2022-05-18 @1511 raw_spin_lock_irqsave_rcu_node(rtpcp, flags); dc7d54b45170e1 Paul E. McKenney 2022-05-18 1512 list_splice_init(&rtpcp->rtp_blkd_tasks, &blkd_tasks); dc7d54b45170e1 Paul E. McKenney 2022-05-18 1513 while (!list_empty(&blkd_tasks)) { dc7d54b45170e1 Paul E. McKenney 2022-05-18 1514 rcu_read_lock(); dc7d54b45170e1 Paul E. McKenney 2022-05-18 1515 t = list_first_entry(&blkd_tasks, struct task_struct, trc_blkd_node); dc7d54b45170e1 Paul E. McKenney 2022-05-18 1516 list_del_init(&t->trc_blkd_node); dc7d54b45170e1 Paul E. McKenney 2022-05-18 1517 list_add(&t->trc_blkd_node, &rtpcp->rtp_blkd_tasks); dc7d54b45170e1 Paul E. McKenney 2022-05-18 1518 raw_spin_unlock_irqrestore_rcu_node(rtpcp, flags); dc7d54b45170e1 Paul E. McKenney 2022-05-18 1519 rcu_tasks_trace_pertask(t, hop); dc7d54b45170e1 Paul E. McKenney 2022-05-18 1520 rcu_read_unlock(); dc7d54b45170e1 Paul E. McKenney 2022-05-18 1521 raw_spin_lock_irqsave_rcu_node(rtpcp, flags); dc7d54b45170e1 Paul E. McKenney 2022-05-18 1522 } dc7d54b45170e1 Paul E. McKenney 2022-05-18 1523 raw_spin_unlock_irqrestore_rcu_node(rtpcp, flags); d6ad60635cafe9 Paul E. McKenney 2022-07-18 1524 cond_resched_tasks_rcu_qs(); dc7d54b45170e1 Paul E. McKenney 2022-05-18 1525 } 56096ecd5b0414 Paul E. McKenney 2022-06-07 1526 56096ecd5b0414 Paul E. McKenney 2022-06-07 1527 // Re-enable CPU hotplug now that the holdout list is populated. 56096ecd5b0414 Paul E. McKenney 2022-06-07 1528 cpus_read_unlock(); 1fa98e2e40e5a4 Paul E. McKenney 2022-05-17 1529 } 1fa98e2e40e5a4 Paul E. McKenney 2022-05-17 1530 :::::: The code at line 1511 was first introduced by commit :::::: dc7d54b45170e1e3ced9f86718aa4274fd727790 rcu-tasks: Pull in tasks blocked within RCU Tasks Trace readers :::::: TO: Paul E. McKenney :::::: CC: Paul E. McKenney -- 0-DAY CI Kernel Test Service https://01.org/lkp