Re: [PATCH] lockdep: add lockdep_cleanup_dead_cpu()

From: kernel test robot
Date: Sat Oct 28 2023 - 13:15:44 EST


Hi David,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tip/smp/core]
[also build test WARNING on tip/locking/core linus/master v6.6-rc7 next-20231027]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/David-Woodhouse/lockdep-add-lockdep_cleanup_dead_cpu/20231028-191538
base: tip/smp/core
patch link: https://lore.kernel.org/r/e5ba02138c31da60daf91ce505ac3860d022332b.camel%40infradead.org
patch subject: [PATCH] lockdep: add lockdep_cleanup_dead_cpu()
config: powerpc-allyesconfig (https://download.01.org/0day-ci/archive/20231029/202310290041.L5ndwcQ9-lkp@xxxxxxxxx/config)
compiler: powerpc64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231029/202310290041.L5ndwcQ9-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310290041.L5ndwcQ9-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> kernel/locking/lockdep.c:4557: warning: Function parameter or member 'cpu' not described in 'lockdep_cleanup_dead_cpu'
>> kernel/locking/lockdep.c:4557: warning: Function parameter or member 'idle' not described in 'lockdep_cleanup_dead_cpu'


vim +4557 kernel/locking/lockdep.c

4548
4549 /**
4550 * lockdep_cleanup_dead_cpu - Ensure CPU lockdep state is cleanly stopped
4551 *
4552 * Invoked after the CPU is dead. Ensures that the tracing infrastructure
4553 * is left in a suitable state for the CPU to be subsequently brought
4554 * online again.
4555 */
4556 void lockdep_cleanup_dead_cpu(unsigned int cpu, struct task_struct *idle)
> 4557 {
4558 if (unlikely(!debug_locks))
4559 return;
4560
4561 if (unlikely(per_cpu(hardirqs_enabled, cpu))) {
4562 pr_warn("CPU %u left hardirqs enabled!", cpu);
4563 if (idle)
4564 print_irqtrace_events(idle);
4565 /* Clean it up for when the CPU comes online again. */
4566 per_cpu(hardirqs_enabled, cpu) = 0;
4567 }
4568 }
4569

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki