tree:
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git locking/irqstate
head: 886d429f4a3a4b0af97566f5f6cb26ae7ddf2807
commit: 5321a620f6eb25e0990612f2e93670851415f344 [19/20] lockdep: Change
hardirq{s_enabled,_context} to per-cpu variables
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-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
git checkout 5321a620f6eb25e0990612f2e93670851415f344
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/powerpc/include/asm/rtas-types.h:5,
from arch/powerpc/include/asm/paca.h:32,
from arch/powerpc/include/asm/percpu.h:13,
from include/linux/lockdep.h:22,
from drivers/net/ethernet/netronome/nfp/nfp_port.c:4:
> include/linux/spinlock_types.h:27:21: error: field
'dep_map' has incomplete type
27 | struct lockdep_map dep_map;
| ^~~~~~~
include/linux/spinlock_types.h:79:23: error: field 'dep_map' has incomplete
type
79 | struct lockdep_map dep_map;
| ^~~~~~~
In file included from include/linux/spinlock_types.h:99,
from arch/powerpc/include/asm/rtas-types.h:5,
from arch/powerpc/include/asm/paca.h:32,
from arch/powerpc/include/asm/percpu.h:13,
from include/linux/lockdep.h:22,
from drivers/net/ethernet/netronome/nfp/nfp_port.c:4:
> include/linux/rwlock_types.h:18:21: error: field
'dep_map' has incomplete type
18 | struct lockdep_map dep_map;
| ^~~~~~~
In file included from arch/powerpc/include/asm/rtas-types.h:5,
from arch/powerpc/include/asm/paca.h:32,
from arch/powerpc/include/asm/percpu.h:13,
from include/linux/lockdep.h:22,
from drivers/net/ethernet/netronome/nfp/nfp_port.c:4:
include/linux/semaphore.h: In function 'sema_init':
> include/linux/spinlock_types.h:38:3: error: field name not in
record or union initializer
38 | .name = #lockname, \
| ^
include/linux/spinlock_types.h:64:2: note: in expansion of macro
'RAW_SPIN_DEP_MAP_INIT'
64 | RAW_SPIN_DEP_MAP_INIT(lockname) }
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/spinlock_types.h:67:19: note: in expansion of macro
'__RAW_SPIN_LOCK_INITIALIZER'
67 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/semaphore.h:23:11: note: in expansion of macro
'__RAW_SPIN_LOCK_UNLOCKED'
23 | .lock = __RAW_SPIN_LOCK_UNLOCKED((name).lock), \
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/semaphore.h:34:28: note: in expansion of macro
'__SEMAPHORE_INITIALIZER'
34 | *sem = (struct semaphore) __SEMAPHORE_INITIALIZER(*sem, val);
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/spinlock_types.h:38:3: note: (near initialization for
'(anonymous).dep_map')
38 | .name = #lockname, \
| ^
include/linux/spinlock_types.h:64:2: note: in expansion of macro
'RAW_SPIN_DEP_MAP_INIT'
64 | RAW_SPIN_DEP_MAP_INIT(lockname) }
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/spinlock_types.h:67:19: note: in expansion of macro
'__RAW_SPIN_LOCK_INITIALIZER'
67 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/semaphore.h:23:11: note: in expansion of macro
'__RAW_SPIN_LOCK_UNLOCKED'
23 | .lock = __RAW_SPIN_LOCK_UNLOCKED((name).lock), \
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/semaphore.h:34:28: note: in expansion of macro
'__SEMAPHORE_INITIALIZER'
34 | *sem = (struct semaphore) __SEMAPHORE_INITIALIZER(*sem, val);
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/spinlock_types.h:39:3: error: field name not in record or union
initializer
39 | .wait_type_inner = LD_WAIT_SPIN, \
| ^
include/linux/spinlock_types.h:64:2: note: in expansion of macro
'RAW_SPIN_DEP_MAP_INIT'
64 | RAW_SPIN_DEP_MAP_INIT(lockname) }
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/spinlock_types.h:67:19: note: in expansion of macro
'__RAW_SPIN_LOCK_INITIALIZER'
67 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/semaphore.h:23:11: note: in expansion of macro
'__RAW_SPIN_LOCK_UNLOCKED'
23 | .lock = __RAW_SPIN_LOCK_UNLOCKED((name).lock), \
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/semaphore.h:34:28: note: in expansion of macro
'__SEMAPHORE_INITIALIZER'
34 | *sem = (struct semaphore) __SEMAPHORE_INITIALIZER(*sem, val);
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/spinlock_types.h:39:3: note: (near initialization for
'(anonymous).dep_map')
39 | .wait_type_inner = LD_WAIT_SPIN, \
| ^
include/linux/spinlock_types.h:64:2: note: in expansion of macro
'RAW_SPIN_DEP_MAP_INIT'
64 | RAW_SPIN_DEP_MAP_INIT(lockname) }
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/spinlock_types.h:67:19: note: in expansion of macro
'__RAW_SPIN_LOCK_INITIALIZER'
67 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/semaphore.h:23:11: note: in expansion of macro
'__RAW_SPIN_LOCK_UNLOCKED'
23 | .lock = __RAW_SPIN_LOCK_UNLOCKED((name).lock), \
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/semaphore.h:34:28: note: in expansion of macro
'__SEMAPHORE_INITIALIZER'
34 | *sem = (struct semaphore) __SEMAPHORE_INITIALIZER(*sem, val);
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/powerpc/include/asm/rtas-types.h:5,
from arch/powerpc/include/asm/paca.h:32,
from arch/powerpc/include/asm/percpu.h:13,
from include/linux/lockdep.h:22,
from drivers/net/ethernet/netronome/nfp/nfp_port.c:4:
include/net/sock.h: In function 'sk_validate_xmit_skb':
> include/linux/spinlock_types.h:38:3: error: field name not in
record or union initializer
38 | .name = #lockname, \
| ^
include/linux/spinlock_types.h:64:2: note: in expansion of macro
'RAW_SPIN_DEP_MAP_INIT'
64 | RAW_SPIN_DEP_MAP_INIT(lockname) }
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/spinlock_types.h:67:19: note: in expansion of macro
'__RAW_SPIN_LOCK_INITIALIZER'
67 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ratelimit.h:27:12: note: in expansion of macro
'__RAW_SPIN_LOCK_UNLOCKED'
27 | .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ratelimit.h:38:3: note: in expansion of macro
'RATELIMIT_STATE_INIT'
38 | RATELIMIT_STATE_INIT(name, interval_init, burst_init) \
| ^~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:502:9: note: in expansion of macro
'DEFINE_RATELIMIT_STATE'
502 | static DEFINE_RATELIMIT_STATE(_rs, \
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:523:2: note: in expansion of macro 'printk_ratelimited'
523 | printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~
include/net/sock.h:2593:3: note: in expansion of macro 'pr_warn_ratelimited'
2593 | pr_warn_ratelimited("unencrypted skb with no associated socket -
dropping\n");
| ^~~~~~~~~~~~~~~~~~~
include/linux/spinlock_types.h:38:3: note: (near initialization for
'(anonymous).dep_map')
38 | .name = #lockname, \
| ^
include/linux/spinlock_types.h:64:2: note: in expansion of macro
'RAW_SPIN_DEP_MAP_INIT'
64 | RAW_SPIN_DEP_MAP_INIT(lockname) }
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/spinlock_types.h:67:19: note: in expansion of macro
'__RAW_SPIN_LOCK_INITIALIZER'
67 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ratelimit.h:27:12: note: in expansion of macro
'__RAW_SPIN_LOCK_UNLOCKED'
27 | .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ratelimit.h:38:3: note: in expansion of macro
'RATELIMIT_STATE_INIT'
38 | RATELIMIT_STATE_INIT(name, interval_init, burst_init) \
| ^~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:502:9: note: in expansion of macro
'DEFINE_RATELIMIT_STATE'
502 | static DEFINE_RATELIMIT_STATE(_rs, \
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:523:2: note: in expansion of macro 'printk_ratelimited'
523 | printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~
include/net/sock.h:2593:3: note: in expansion of macro 'pr_warn_ratelimited'
2593 | pr_warn_ratelimited("unencrypted skb with no associated socket -
dropping\n");
| ^~~~~~~~~~~~~~~~~~~
include/linux/spinlock_types.h:39:3: error: field name not in record or union
initializer
39 | .wait_type_inner = LD_WAIT_SPIN, \
| ^
include/linux/spinlock_types.h:64:2: note: in expansion of macro
'RAW_SPIN_DEP_MAP_INIT'
64 | RAW_SPIN_DEP_MAP_INIT(lockname) }
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/spinlock_types.h:67:19: note: in expansion of macro
'__RAW_SPIN_LOCK_INITIALIZER'
67 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ratelimit.h:27:12: note: in expansion of macro
'__RAW_SPIN_LOCK_UNLOCKED'
27 | .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ratelimit.h:38:3: note: in expansion of macro
'RATELIMIT_STATE_INIT'
38 | RATELIMIT_STATE_INIT(name, interval_init, burst_init) \
| ^~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:502:9: note: in expansion of macro
'DEFINE_RATELIMIT_STATE'
502 | static DEFINE_RATELIMIT_STATE(_rs, \
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:523:2: note: in expansion of macro 'printk_ratelimited'
523 | printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~
include/net/sock.h:2593:3: note: in expansion of macro 'pr_warn_ratelimited'
2593 | pr_warn_ratelimited("unencrypted skb with no associated socket -
dropping\n");
| ^~~~~~~~~~~~~~~~~~~
include/linux/spinlock_types.h:39:3: note: (near initialization for
'(anonymous).dep_map')
39 | .wait_type_inner = LD_WAIT_SPIN, \
| ^
include/linux/spinlock_types.h:64:2: note: in expansion of macro
'RAW_SPIN_DEP_MAP_INIT'
64 | RAW_SPIN_DEP_MAP_INIT(lockname) }
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/spinlock_types.h:67:19: note: in expansion of macro
'__RAW_SPIN_LOCK_INITIALIZER'
67 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ratelimit.h:27:12: note: in expansion of macro
'__RAW_SPIN_LOCK_UNLOCKED'
27 | .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ratelimit.h:38:3: note: in expansion of macro
'RATELIMIT_STATE_INIT'
38 | RATELIMIT_STATE_INIT(name, interval_init, burst_init) \
| ^~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:502:9: note: in expansion of macro
'DEFINE_RATELIMIT_STATE'
502 | static DEFINE_RATELIMIT_STATE(_rs, \
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:523:2: note: in expansion of macro 'printk_ratelimited'
523 | printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~
include/net/sock.h:2593:3: note: in expansion of macro 'pr_warn_ratelimited'
2593 | pr_warn_ratelimited("unencrypted skb with no associated socket -
dropping\n");
| ^~~~~~~~~~~~~~~~~~~
vim +/dep_map +27 include/linux/spinlock_types.h
21f8ca3bf6198b Peter Zijlstra 2007-07-19 19
c2f21ce2e31286 Thomas Gleixner 2009-12-02 20 typedef struct raw_spinlock {
445c89514be242 Thomas Gleixner 2009-12-02 21 arch_spinlock_t raw_lock;
fb1c8f93d869b3 Ingo Molnar 2005-09-10 22 #ifdef CONFIG_DEBUG_SPINLOCK
fb1c8f93d869b3 Ingo Molnar 2005-09-10 23 unsigned int magic, owner_cpu;
fb1c8f93d869b3 Ingo Molnar 2005-09-10 24 void *owner;
fb1c8f93d869b3 Ingo Molnar 2005-09-10 25 #endif
8a25d5debff2da Ingo Molnar 2006-07-03 26 #ifdef CONFIG_DEBUG_LOCK_ALLOC
8a25d5debff2da Ingo Molnar 2006-07-03 @27 struct lockdep_map dep_map;
8a25d5debff2da Ingo Molnar 2006-07-03 28 #endif
c2f21ce2e31286 Thomas Gleixner 2009-12-02 29 } raw_spinlock_t;
fb1c8f93d869b3 Ingo Molnar 2005-09-10 30
fb1c8f93d869b3 Ingo Molnar 2005-09-10 31 #define SPINLOCK_MAGIC 0xdead4ead
fb1c8f93d869b3 Ingo Molnar 2005-09-10 32
fb1c8f93d869b3 Ingo Molnar 2005-09-10 33 #define SPINLOCK_OWNER_INIT ((void *)-1L)
fb1c8f93d869b3 Ingo Molnar 2005-09-10 34
8a25d5debff2da Ingo Molnar 2006-07-03 35 #ifdef CONFIG_DEBUG_LOCK_ALLOC
de8f5e4f2dc1f0 Peter Zijlstra 2020-03-21 36 # define
RAW_SPIN_DEP_MAP_INIT(lockname) \
de8f5e4f2dc1f0 Peter Zijlstra 2020-03-21 37 .dep_map = { \
de8f5e4f2dc1f0 Peter Zijlstra 2020-03-21 @38 .name = #lockname, \
de8f5e4f2dc1f0 Peter Zijlstra 2020-03-21 39 .wait_type_inner = LD_WAIT_SPIN, \
de8f5e4f2dc1f0 Peter Zijlstra 2020-03-21 40 }
de8f5e4f2dc1f0 Peter Zijlstra 2020-03-21 41 # define SPIN_DEP_MAP_INIT(lockname) \
de8f5e4f2dc1f0 Peter Zijlstra 2020-03-21 42 .dep_map = { \
de8f5e4f2dc1f0 Peter Zijlstra 2020-03-21 43 .name = #lockname, \
de8f5e4f2dc1f0 Peter Zijlstra 2020-03-21 44 .wait_type_inner = LD_WAIT_CONFIG, \
de8f5e4f2dc1f0 Peter Zijlstra 2020-03-21 45 }
8a25d5debff2da Ingo Molnar 2006-07-03 46 #else
de8f5e4f2dc1f0 Peter Zijlstra 2020-03-21 47 # define RAW_SPIN_DEP_MAP_INIT(lockname)
8a25d5debff2da Ingo Molnar 2006-07-03 48 # define SPIN_DEP_MAP_INIT(lockname)
8a25d5debff2da Ingo Molnar 2006-07-03 49 #endif
8a25d5debff2da Ingo Molnar 2006-07-03 50
:::::: The code at line 27 was first introduced by commit
:::::: 8a25d5debff2daee280e83e09d8c25d67c26a972 [PATCH] lockdep: prove spinlock rwlock
locking correctness
:::::: TO: Ingo Molnar <mingo(a)elte.hu>
:::::: CC: Linus Torvalds <torvalds(a)g5.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org