Hi Nicholas, I love your patch! Yet something to improve: [auto build test ERROR on linux/master] [also build test ERROR on powerpc/next linus/master v5.8-rc6 next-20200723] [cannot apply to tip/locking/core] [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] url: https://github.com/0day-ci/linux/commits/Nicholas-Piggin/lockdep-improve-current-hard-soft-irqs_enabled-synchronisation-with-actual-irq-state/20200723-185938 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 9ebcfadb0610322ac537dd7aa5d9cbc2b2894c68 config: nds32-allyesconfig (attached as .config) compiler: nds32le-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 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): In file included from include/asm-generic/bitops.h:14, from ./arch/nds32/include/generated/asm/bitops.h:1, from include/linux/bitops.h:29, from include/linux/kernel.h:12, from include/linux/list.h:9, from include/linux/rculist.h:10, from include/linux/pid.h:5, from include/linux/sched.h:14, from arch/nds32/kernel/asm-offsets.c:4: include/linux/spinlock_api_smp.h: In function '__raw_spin_lock_irq': >> include/linux/irqflags.h:158:31: error: implicit declaration of function 'arch_irqs_disabled'; did you mean 'raw_irqs_disabled'? [-Werror=implicit-function-declaration] 158 | #define raw_irqs_disabled() (arch_irqs_disabled()) | ^~~~~~~~~~~~~~~~~~ include/linux/irqflags.h:174:23: note: in expansion of macro 'raw_irqs_disabled' 174 | bool was_disabled = raw_irqs_disabled(); \ | ^~~~~~~~~~~~~~~~~ include/linux/spinlock_api_smp.h:126:2: note: in expansion of macro 'local_irq_disable' 126 | local_irq_disable(); | ^~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors make[2]: *** [scripts/Makefile.build:114: arch/nds32/kernel/asm-offsets.s] Error 1 make[2]: Target '__build' not remade because of errors. make[1]: *** [Makefile:1175: prepare0] Error 2 make[1]: Target 'prepare' not remade because of errors. make: *** [Makefile:185: __sub-make] Error 2 make: Target 'prepare' not remade because of errors. vim +158 include/linux/irqflags.h 81d68a96a398448 Steven Rostedt 2008-05-12 132 df9ee29270c11db David Howells 2010-10-07 133 /* df9ee29270c11db David Howells 2010-10-07 134 * Wrap the arch provided IRQ routines to provide appropriate checks. df9ee29270c11db David Howells 2010-10-07 135 */ df9ee29270c11db David Howells 2010-10-07 136 #define raw_local_irq_disable() arch_local_irq_disable() df9ee29270c11db David Howells 2010-10-07 137 #define raw_local_irq_enable() arch_local_irq_enable() df9ee29270c11db David Howells 2010-10-07 138 #define raw_local_irq_save(flags) \ df9ee29270c11db David Howells 2010-10-07 139 do { \ df9ee29270c11db David Howells 2010-10-07 140 typecheck(unsigned long, flags); \ df9ee29270c11db David Howells 2010-10-07 141 flags = arch_local_irq_save(); \ df9ee29270c11db David Howells 2010-10-07 142 } while (0) df9ee29270c11db David Howells 2010-10-07 143 #define raw_local_irq_restore(flags) \ df9ee29270c11db David Howells 2010-10-07 144 do { \ df9ee29270c11db David Howells 2010-10-07 145 typecheck(unsigned long, flags); \ df9ee29270c11db David Howells 2010-10-07 146 arch_local_irq_restore(flags); \ df9ee29270c11db David Howells 2010-10-07 147 } while (0) df9ee29270c11db David Howells 2010-10-07 148 #define raw_local_save_flags(flags) \ df9ee29270c11db David Howells 2010-10-07 149 do { \ df9ee29270c11db David Howells 2010-10-07 150 typecheck(unsigned long, flags); \ df9ee29270c11db David Howells 2010-10-07 151 flags = arch_local_save_flags(); \ df9ee29270c11db David Howells 2010-10-07 152 } while (0) df9ee29270c11db David Howells 2010-10-07 153 #define raw_irqs_disabled_flags(flags) \ df9ee29270c11db David Howells 2010-10-07 154 ({ \ df9ee29270c11db David Howells 2010-10-07 155 typecheck(unsigned long, flags); \ df9ee29270c11db David Howells 2010-10-07 156 arch_irqs_disabled_flags(flags); \ df9ee29270c11db David Howells 2010-10-07 157 }) df9ee29270c11db David Howells 2010-10-07 @158 #define raw_irqs_disabled() (arch_irqs_disabled()) df9ee29270c11db David Howells 2010-10-07 159 #define raw_safe_halt() arch_safe_halt() de30a2b355ea853 Ingo Molnar 2006-07-03 160 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org