Re: [PATCH] locking: detect spin_lock_irq() call with disabled interrupts
From: kernel test robot
Date: Fri Jun 06 2025 - 17:10:45 EST
Hi Pavel,
kernel test robot noticed the following build warnings:
[auto build test WARNING on tip/locking/core]
[also build test WARNING on sysctl/sysctl-next akpm-mm/mm-nonmm-unstable tip/master linus/master v6.15 next-20250606]
[cannot apply to mcgrof/sysctl-next tip/auto-latest]
[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/Pavel-Tikhomirov/locking-detect-spin_lock_irq-call-with-disabled-interrupts/20250606-175911
base: tip/locking/core
patch link: https://lore.kernel.org/r/20250606095741.46775-1-ptikhomirov%40virtuozzo.com
patch subject: [PATCH] locking: detect spin_lock_irq() call with disabled interrupts
config: arm-randconfig-003-20250606 (https://download.01.org/0day-ci/archive/20250607/202506070405.MCweX7O0-lkp@xxxxxxxxx/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project f819f46284f2a79790038e1f6649172789734ae8)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250607/202506070405.MCweX7O0-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/202506070405.MCweX7O0-lkp@xxxxxxxxx/
All warnings (new ones prefixed by >>):
In file included from arch/arm/plat-orion/irq.c:13:
In file included from include/linux/irq.h:14:
include/linux/spinlock.h:375:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
375 | DECLARE_STATIC_KEY_MAYBE(CONFIG_DEBUG_SPINLOCK_IRQ_WITH_DISABLED_INTERRUPTS_BY_DEFAULT,
| ^
| int
include/linux/spinlock.h:375:26: error: a parameter list without types is only allowed in a function definition
375 | DECLARE_STATIC_KEY_MAYBE(CONFIG_DEBUG_SPINLOCK_IRQ_WITH_DISABLED_INTERRUPTS_BY_DEFAULT,
| ^
include/linux/spinlock.h:382:6: error: call to undeclared function 'static_branch_unlikely'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
382 | if (static_branch_unlikely(&debug_spin_lock_irq_with_disabled_interrupts)) {
| ^
include/linux/spinlock.h:382:30: error: use of undeclared identifier 'debug_spin_lock_irq_with_disabled_interrupts'
382 | if (static_branch_unlikely(&debug_spin_lock_irq_with_disabled_interrupts)) {
| ^
include/linux/spinlock.h:384:4: error: call to undeclared function 'static_branch_disable'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
384 | static_branch_disable(&debug_spin_lock_irq_with_disabled_interrupts);
| ^
include/linux/spinlock.h:384:27: error: use of undeclared identifier 'debug_spin_lock_irq_with_disabled_interrupts'
384 | static_branch_disable(&debug_spin_lock_irq_with_disabled_interrupts);
| ^
include/linux/spinlock.h:415:6: error: call to undeclared function 'static_branch_unlikely'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
415 | if (static_branch_unlikely(&debug_spin_lock_irq_with_disabled_interrupts)) {
| ^
include/linux/spinlock.h:415:30: error: use of undeclared identifier 'debug_spin_lock_irq_with_disabled_interrupts'
415 | if (static_branch_unlikely(&debug_spin_lock_irq_with_disabled_interrupts)) {
| ^
include/linux/spinlock.h:417:4: error: call to undeclared function 'static_branch_disable'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
417 | static_branch_disable(&debug_spin_lock_irq_with_disabled_interrupts);
| ^
include/linux/spinlock.h:417:27: error: use of undeclared identifier 'debug_spin_lock_irq_with_disabled_interrupts'
417 | static_branch_disable(&debug_spin_lock_irq_with_disabled_interrupts);
| ^
>> arch/arm/plat-orion/irq.c:37:29: warning: shift count >= width of type [-Wshift-count-overflow]
37 | irq_setup_generic_chip(gc, IRQ_MSK(32), IRQ_GC_INIT_MASK_CACHE,
| ^~~~~~~~~~~
include/linux/irq.h:1223:41: note: expanded from macro 'IRQ_MSK'
1223 | #define IRQ_MSK(n) (u32)((n) < 32 ? ((1 << (n)) - 1) : UINT_MAX)
| ^ ~~~
1 warning and 10 errors generated.
vim +37 arch/arm/plat-orion/irq.c
f28d7de6bd4d41 Sebastian Hesselbarth 2014-01-16 21
01eb569823792a Lennert Buytenhek 2008-03-27 22 void __init orion_irq_init(unsigned int irq_start, void __iomem *maskaddr)
01eb569823792a Lennert Buytenhek 2008-03-27 23 {
e59347a1d15c0b Thomas Gleixner 2011-04-14 24 struct irq_chip_generic *gc;
e59347a1d15c0b Thomas Gleixner 2011-04-14 25 struct irq_chip_type *ct;
01eb569823792a Lennert Buytenhek 2008-03-27 26
01eb569823792a Lennert Buytenhek 2008-03-27 27 /*
01eb569823792a Lennert Buytenhek 2008-03-27 28 * Mask all interrupts initially.
01eb569823792a Lennert Buytenhek 2008-03-27 29 */
01eb569823792a Lennert Buytenhek 2008-03-27 30 writel(0, maskaddr);
01eb569823792a Lennert Buytenhek 2008-03-27 31
e59347a1d15c0b Thomas Gleixner 2011-04-14 32 gc = irq_alloc_generic_chip("orion_irq", 1, irq_start, maskaddr,
f38c02f3b33865 Thomas Gleixner 2011-03-24 33 handle_level_irq);
e59347a1d15c0b Thomas Gleixner 2011-04-14 34 ct = gc->chip_types;
e59347a1d15c0b Thomas Gleixner 2011-04-14 35 ct->chip.irq_mask = irq_gc_mask_clr_bit;
e59347a1d15c0b Thomas Gleixner 2011-04-14 36 ct->chip.irq_unmask = irq_gc_mask_set_bit;
e59347a1d15c0b Thomas Gleixner 2011-04-14 @37 irq_setup_generic_chip(gc, IRQ_MSK(32), IRQ_GC_INIT_MASK_CACHE,
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki