Messages in this thread | | | Date | Mon, 14 Jun 2021 05:47:50 +0800 | From | kernel test robot <> | Subject | [tip:tmp.tmp2 351/364] include/linux/seqlock.h:239:76: error: implicit declaration of function 'mutex_unlock'; did you mean |
| |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2 head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324 commit: 6c13131b6a385211160e6bd8a211e5ed72e780a8 [351/364] sched/headers, locking/seqlocks: Optimize <linux/seqlock.h> config: sparc64-randconfig-r015-20210613 (attached as .config) compiler: sparc64-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 # https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=6c13131b6a385211160e6bd8a211e5ed72e780a8 git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git git fetch --no-tags tip tmp.tmp2 git checkout 6c13131b6a385211160e6bd8a211e5ed72e780a8 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc64
If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from arch/sparc/kernel/asm-offsets.c:14: include/linux/sched.h:475:20: error: array type has incomplete element type 'struct held_lock' 475 | struct held_lock held_locks[MAX_LOCK_DEPTH]; | ^~~~~~~~~~ In file included from ./arch/sparc/include/generated/asm/preempt.h:1, from include/linux/preempt.h:80, from include/linux/spinlock.h:53, from include/linux/mm_types.h:9, from arch/sparc/kernel/asm-offsets.c:15: include/asm-generic/preempt.h: In function '__preempt_count_dec_and_test': include/asm-generic/preempt.h:69:36: error: implicit declaration of function 'tif_need_resched' [-Werror=implicit-function-declaration] 69 | return !--*preempt_count_ptr() && tif_need_resched(); | ^~~~~~~~~~~~~~~~ In file included from include/linux/mm_types.h:17, from arch/sparc/kernel/asm-offsets.c:15: include/linux/seqlock.h: In function '__seqprop_mutex_sequence': include/linux/seqlock.h:239:86: error: implicit declaration of function 'mutex_lock' [-Werror=implicit-function-declaration] 239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock)) | ^~~~~~~~~~ include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK' 136 | #define __SEQ_LOCK(expr) expr | ^~~~ include/linux/seqlock.h:239:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME' 239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock)) | ^~~~~~~~~~~~~~~~~ >> include/linux/seqlock.h:239:76: error: implicit declaration of function 'mutex_unlock'; did you mean 'write_unlock'? [-Werror=implicit-function-declaration] 239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock)) | ^~~~~ include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK' 136 | #define __SEQ_LOCK(expr) expr | ^~~~ include/linux/seqlock.h:239:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME' 239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock)) | ^~~~~~~~~~~~~~~~~ include/linux/seqlock.h: In function '__seqprop_mutex_assert': include/linux/lockdep.h:286:52: error: dereferencing pointer to incomplete type 'struct mutex' 286 | #define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map) | ^~ include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK' 136 | #define __SEQ_LOCK(expr) expr | ^~~~ include/linux/lockdep.h:310:3: note: in expansion of macro 'WARN_ON' 310 | WARN_ON(debug_locks && \ | ^~~~~~~ include/linux/lockdep.h:311:4: note: in expansion of macro 'lockdep_is_held' 311 | lockdep_is_held(l) == LOCK_STATE_NOT_HELD); \ | ^~~~~~~~~~~~~~~ include/linux/seqlock.h:231:13: note: in expansion of macro 'lockdep_assert_held' 231 | __SEQ_LOCK(lockdep_assert_held(lockmember)); \ | ^~~~~~~~~~~~~~~~~~~ include/linux/seqlock.h:239:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME' 239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock)) | ^~~~~~~~~~~~~~~~~ include/linux/seqlock.h: In function '__seqprop_ww_mutex_sequence': >> include/linux/seqlock.h:240:86: error: implicit declaration of function 'ww_mutex_lock'; did you mean 'write_lock'? [-Werror=implicit-function-declaration] 240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL)) | ^~~~~~~~~~~~~ include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK' 136 | #define __SEQ_LOCK(expr) expr | ^~~~ include/linux/seqlock.h:240:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME' 240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL)) | ^~~~~~~~~~~~~~~~~ >> include/linux/seqlock.h:240:76: error: implicit declaration of function 'ww_mutex_unlock'; did you mean 'write_unlock'? [-Werror=implicit-function-declaration] 240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL)) | ^~~~~~~~ include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK' 136 | #define __SEQ_LOCK(expr) expr | ^~~~ include/linux/seqlock.h:240:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME' 240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL)) | ^~~~~~~~~~~~~~~~~ include/linux/seqlock.h: In function '__seqprop_ww_mutex_assert': include/linux/seqlock.h:240:68: error: dereferencing pointer to incomplete type 'struct ww_mutex' 240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL)) | ^~ include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK' 136 | #define __SEQ_LOCK(expr) expr | ^~~~ include/linux/lockdep.h:310:3: note: in expansion of macro 'WARN_ON' 310 | WARN_ON(debug_locks && \ | ^~~~~~~ include/linux/lockdep.h:311:4: note: in expansion of macro 'lockdep_is_held' 311 | lockdep_is_held(l) == LOCK_STATE_NOT_HELD); \ | ^~~~~~~~~~~~~~~ include/linux/seqlock.h:231:13: note: in expansion of macro 'lockdep_assert_held' 231 | __SEQ_LOCK(lockdep_assert_held(lockmember)); \ | ^~~~~~~~~~~~~~~~~~~ include/linux/seqlock.h:240:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME' 240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL)) | ^~~~~~~~~~~~~~~~~ arch/sparc/kernel/asm-offsets.c: At top level: arch/sparc/kernel/asm-offsets.c:29:5: warning: no previous prototype for 'sparc64_foo' [-Wmissing-prototypes] 29 | int sparc64_foo(void) | ^~~~~~~~~~~ arch/sparc/kernel/asm-offsets.c:48:5: warning: no previous prototype for 'foo' [-Wmissing-prototypes] 48 | int foo(void) | ^~~ In file included from arch/sparc/kernel/asm-offsets.c:17: arch/sparc/kernel/asm-offsets.c: In function 'foo': include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread' 140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b) | ^~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE' 6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val)) | ^~~ include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof' 17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) | ^~~~~~~~~~~~~~~~~~~ arch/sparc/kernel/asm-offsets.c:51:27: note: in expansion of macro 'offsetof' 51 | DEFINE(AOFF_task_thread, offsetof(struct task_struct, thread)); | ^~~~~~~~ cc1: some warnings being treated as errors -- In file included from arch/sparc/kernel/asm-offsets.c:14: include/linux/sched.h:475:20: error: array type has incomplete element type 'struct held_lock' 475 | struct held_lock held_locks[MAX_LOCK_DEPTH]; | ^~~~~~~~~~ In file included from ./arch/sparc/include/generated/asm/preempt.h:1, from include/linux/preempt.h:80, from include/linux/spinlock.h:53, from include/linux/mm_types.h:9, from arch/sparc/kernel/asm-offsets.c:15: include/asm-generic/preempt.h: In function '__preempt_count_dec_and_test': include/asm-generic/preempt.h:69:36: error: implicit declaration of function 'tif_need_resched' [-Werror=implicit-function-declaration] 69 | return !--*preempt_count_ptr() && tif_need_resched(); | ^~~~~~~~~~~~~~~~ In file included from include/linux/mm_types.h:17, from arch/sparc/kernel/asm-offsets.c:15: include/linux/seqlock.h: In function '__seqprop_mutex_sequence': include/linux/seqlock.h:239:86: error: implicit declaration of function 'mutex_lock' [-Werror=implicit-function-declaration] 239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock)) | ^~~~~~~~~~ include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK' 136 | #define __SEQ_LOCK(expr) expr | ^~~~ include/linux/seqlock.h:239:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME' 239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock)) | ^~~~~~~~~~~~~~~~~ >> include/linux/seqlock.h:239:76: error: implicit declaration of function 'mutex_unlock'; did you mean 'write_unlock'? [-Werror=implicit-function-declaration] 239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock)) | ^~~~~ include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK' 136 | #define __SEQ_LOCK(expr) expr | ^~~~ include/linux/seqlock.h:239:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME' 239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock)) | ^~~~~~~~~~~~~~~~~ include/linux/seqlock.h: In function '__seqprop_mutex_assert': include/linux/lockdep.h:286:52: error: dereferencing pointer to incomplete type 'struct mutex' 286 | #define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map) | ^~ include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK' 136 | #define __SEQ_LOCK(expr) expr | ^~~~ include/linux/lockdep.h:310:3: note: in expansion of macro 'WARN_ON' 310 | WARN_ON(debug_locks && \ | ^~~~~~~ include/linux/lockdep.h:311:4: note: in expansion of macro 'lockdep_is_held' 311 | lockdep_is_held(l) == LOCK_STATE_NOT_HELD); \ | ^~~~~~~~~~~~~~~ include/linux/seqlock.h:231:13: note: in expansion of macro 'lockdep_assert_held' 231 | __SEQ_LOCK(lockdep_assert_held(lockmember)); \ | ^~~~~~~~~~~~~~~~~~~ include/linux/seqlock.h:239:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME' 239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock)) | ^~~~~~~~~~~~~~~~~ include/linux/seqlock.h: In function '__seqprop_ww_mutex_sequence': >> include/linux/seqlock.h:240:86: error: implicit declaration of function 'ww_mutex_lock'; did you mean 'write_lock'? [-Werror=implicit-function-declaration] 240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL)) | ^~~~~~~~~~~~~ include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK' 136 | #define __SEQ_LOCK(expr) expr | ^~~~ include/linux/seqlock.h:240:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME' 240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL)) | ^~~~~~~~~~~~~~~~~ >> include/linux/seqlock.h:240:76: error: implicit declaration of function 'ww_mutex_unlock'; did you mean 'write_unlock'? [-Werror=implicit-function-declaration] 240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL)) | ^~~~~~~~ include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK' 136 | #define __SEQ_LOCK(expr) expr | ^~~~ include/linux/seqlock.h:240:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME' 240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL)) | ^~~~~~~~~~~~~~~~~ include/linux/seqlock.h: In function '__seqprop_ww_mutex_assert': include/linux/seqlock.h:240:68: error: dereferencing pointer to incomplete type 'struct ww_mutex' 240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL)) | ^~ include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK' 136 | #define __SEQ_LOCK(expr) expr | ^~~~ include/linux/lockdep.h:310:3: note: in expansion of macro 'WARN_ON' 310 | WARN_ON(debug_locks && \ | ^~~~~~~ include/linux/lockdep.h:311:4: note: in expansion of macro 'lockdep_is_held' 311 | lockdep_is_held(l) == LOCK_STATE_NOT_HELD); \ | ^~~~~~~~~~~~~~~ include/linux/seqlock.h:231:13: note: in expansion of macro 'lockdep_assert_held' 231 | __SEQ_LOCK(lockdep_assert_held(lockmember)); \ | ^~~~~~~~~~~~~~~~~~~ include/linux/seqlock.h:240:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME' 240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL)) | ^~~~~~~~~~~~~~~~~ arch/sparc/kernel/asm-offsets.c: At top level: arch/sparc/kernel/asm-offsets.c:29:5: warning: no previous prototype for 'sparc64_foo' [-Wmissing-prototypes] 29 | int sparc64_foo(void) | ^~~~~~~~~~~ arch/sparc/kernel/asm-offsets.c:48:5: warning: no previous prototype for 'foo' [-Wmissing-prototypes] 48 | int foo(void) | ^~~ In file included from arch/sparc/kernel/asm-offsets.c:17: arch/sparc/kernel/asm-offsets.c: In function 'foo': include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread' 140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b) | ^~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE' 6 | asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val)) | ^~~ include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof' 17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) | ^~~~~~~~~~~~~~~~~~~ arch/sparc/kernel/asm-offsets.c:51:27: note: in expansion of macro 'offsetof' 51 | DEFINE(AOFF_task_thread, offsetof(struct task_struct, thread)); | ^~~~~~~~ cc1: some warnings being treated as errors make[2]: *** [scripts/Makefile.build:117: arch/sparc/kernel/asm-offsets.s] Error 1 make[2]: Target '__build' not remade because of errors. make[1]: *** [Makefile:1232: prepare0] Error 2 make[1]: Target 'modules_prepare' not remade because of errors. make: *** [Makefile:215: __sub-make] Error 2 make: Target 'modules_prepare' not remade because of errors. -- WARNING: unmet direct dependencies detected for LOCKDEP Depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && (FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86) Selected by - LOCK_STAT && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT - DEBUG_LOCK_ALLOC && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT In file included from arch/sparc/kernel/asm-offsets.c:14: include/linux/sched.h:475:20: error: array type has incomplete element type 'struct held_lock' 475 | struct held_lock | ^~~~~~~~~~ In file included from ./arch/sparc/include/generated/asm/preempt.h:1, from include/linux/preempt.h:80, from include/linux/spinlock.h:53, from include/linux/mm_types.h:9, from arch/sparc/kernel/asm-offsets.c:15: include/asm-generic/preempt.h: In function '__preempt_count_dec_and_test': include/asm-generic/preempt.h:69:36: error: implicit declaration of function 'tif_need_resched' 69 | return && tif_need_resched(); | ^~~~~~~~~~~~~~~~ In file included from include/linux/mm_types.h:17, from arch/sparc/kernel/asm-offsets.c:15: include/linux/seqlock.h: In function '__seqprop_mutex_sequence': include/linux/seqlock.h:239:86: error: implicit declaration of function 'mutex_lock' 239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock)) | ^~~~~~~~~~ include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK' 136 | #define __SEQ_LOCK(expr) expr | ^~~~ include/linux/seqlock.h:239:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME' 239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock)) | ^~~~~~~~~~~~~~~~~ >> include/linux/seqlock.h:239:76: error: implicit declaration of function 'mutex_unlock'; did you mean 239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock)) | ^~~~~ include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK' 136 | #define __SEQ_LOCK(expr) expr | ^~~~ include/linux/seqlock.h:239:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME' 239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock)) | ^~~~~~~~~~~~~~~~~ include/linux/seqlock.h: In function '__seqprop_mutex_assert': include/linux/lockdep.h:286:52: error: dereferencing pointer to incomplete type 'struct mutex' 286 | #define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map) | ^~ include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK' 136 | #define __SEQ_LOCK(expr) expr | ^~~~ include/linux/lockdep.h:310:3: note: in expansion of macro 'WARN_ON' 310 | WARN_ON(debug_locks && | ^~~~~~~ include/linux/lockdep.h:311:4: note: in expansion of macro 'lockdep_is_held' 311 | lockdep_is_held(l) == LOCK_STATE_NOT_HELD); | ^~~~~~~~~~~~~~~ include/linux/seqlock.h:231:13: note: in expansion of macro 'lockdep_assert_held' 231 | __SEQ_LOCK(lockdep_assert_held(lockmember)); | ^~~~~~~~~~~~~~~~~~~ include/linux/seqlock.h:239:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME' 239 | SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock)) | ^~~~~~~~~~~~~~~~~ include/linux/seqlock.h: In function '__seqprop_ww_mutex_sequence': >> include/linux/seqlock.h:240:86: error: implicit declaration of function 'ww_mutex_lock'; did you mean 240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL)) | ^~~~~~~~~~~~~ include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK' 136 | #define __SEQ_LOCK(expr) expr | ^~~~ include/linux/seqlock.h:240:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME' 240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL)) | ^~~~~~~~~~~~~~~~~ >> include/linux/seqlock.h:240:76: error: implicit declaration of function 'ww_mutex_unlock'; did you mean 240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL)) | ^~~~~~~~ include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK' 136 | #define __SEQ_LOCK(expr) expr | ^~~~ include/linux/seqlock.h:240:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME' 240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL)) | ^~~~~~~~~~~~~~~~~ include/linux/seqlock.h: In function '__seqprop_ww_mutex_assert': include/linux/seqlock.h:240:68: error: dereferencing pointer to incomplete type 'struct ww_mutex' 240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL)) | ^~ include/linux/seqlock.h:136:26: note: in definition of macro '__SEQ_LOCK' 136 | #define __SEQ_LOCK(expr) expr | ^~~~ include/linux/lockdep.h:310:3: note: in expansion of macro 'WARN_ON' 310 | WARN_ON(debug_locks && | ^~~~~~~ include/linux/lockdep.h:311:4: note: in expansion of macro 'lockdep_is_held' 311 | lockdep_is_held(l) == LOCK_STATE_NOT_HELD); | ^~~~~~~~~~~~~~~ include/linux/seqlock.h:231:13: note: in expansion of macro 'lockdep_assert_held' 231 | __SEQ_LOCK(lockdep_assert_held(lockmember)); | ^~~~~~~~~~~~~~~~~~~ include/linux/seqlock.h:240:1: note: in expansion of macro 'SEQCOUNT_LOCKNAME' 240 | SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL)) | ^~~~~~~~~~~~~~~~~ arch/sparc/kernel/asm-offsets.c: At top level: arch/sparc/kernel/asm-offsets.c:29:5: warning: no previous prototype for 'sparc64_foo' 29 | int sparc64_foo(void) | ^~~~~~~~~~~ arch/sparc/kernel/asm-offsets.c:48:5: warning: no previous prototype for 'foo' 48 | int foo(void) | ^~~ In file included from arch/sparc/kernel/asm-offsets.c:17: arch/sparc/kernel/asm-offsets.c: In function 'foo': include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'thread' 140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b) | ^~~~~~~~~~~~~~~~~~ include/linux/kbuild.h:6:62: note: in definition of macro 'DEFINE' 6 | asm volatile("n.ascii "->" #sym " %0 " #val """ : : "i" (val)) | ^~~ include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof' 17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) | ^~~~~~~~~~~~~~~~~~~ arch/sparc/kernel/asm-offsets.c:51:27: note: in expansion of macro 'offsetof' 51 | DEFINE(AOFF_task_thread, offsetof(struct task_struct, thread)); | ^~~~~~~~ cc1: some warnings being treated as errors Makefile arch block certs crypto drivers fs include init ipc kernel lib mm net scripts security sound source usr virt [scripts/Makefile.build:117: arch/sparc/kernel/asm-offsets.s] Error 1 Target '__build' not remade because of errors. Makefile arch block certs crypto drivers fs include init ipc kernel lib mm net scripts security sound source usr virt [Makefile:1232: prepare0] Error 2 Target 'prepare' not remade because of errors. make: Makefile arch block certs crypto drivers fs include init ipc kernel lib mm net scripts security sound source usr virt [Makefile:215: __sub-make] Error 2 make: Target 'prepare' not remade because of errors.
Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for LOCKDEP Depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && (FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86) Selected by - LOCK_STAT && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT - DEBUG_LOCK_ALLOC && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
vim +/mutex_unlock +239 include/linux/seqlock.h
267580db047ef42 peterz@infradead.org 2020-09-15 172 55f3560df975f55 Ahmed S. Darwish 2020-07-20 173 /* 6dd699b13d53f26 Ahmed S. Darwish 2020-09-04 174 * SEQCOUNT_LOCKNAME() - Instantiate seqcount_LOCKNAME_t and helpers 5cdd25572a29e46 Ahmed S. Darwish 2020-09-04 175 * seqprop_LOCKNAME_*() - Property accessors for seqcount_LOCKNAME_t 5cdd25572a29e46 Ahmed S. Darwish 2020-09-04 176 * 6dd699b13d53f26 Ahmed S. Darwish 2020-09-04 177 * @lockname: "LOCKNAME" part of seqcount_LOCKNAME_t 6dd699b13d53f26 Ahmed S. Darwish 2020-09-04 178 * @locktype: LOCKNAME canonical C data type 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 179 * @preemptible: preemptibility of above locktype a8772dccb2ec7b1 Peter Zijlstra 2020-07-23 180 * @lockmember: argument for lockdep_assert_held() 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 181 * @lockbase: associated lock release function (prefix only) 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 182 * @lock_acquire: associated lock acquisition function (full call) 55f3560df975f55 Ahmed S. Darwish 2020-07-20 183 */ 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 184 #define SEQCOUNT_LOCKNAME(lockname, locktype, preemptible, lockmember, lockbase, lock_acquire) \ a8772dccb2ec7b1 Peter Zijlstra 2020-07-23 185 typedef struct seqcount_##lockname { \ a8772dccb2ec7b1 Peter Zijlstra 2020-07-23 186 seqcount_t seqcount; \ a8772dccb2ec7b1 Peter Zijlstra 2020-07-23 187 __SEQ_LOCK(locktype *lock); \ a8772dccb2ec7b1 Peter Zijlstra 2020-07-23 188 } seqcount_##lockname##_t; \ a8772dccb2ec7b1 Peter Zijlstra 2020-07-23 189 \ a8772dccb2ec7b1 Peter Zijlstra 2020-07-23 190 static __always_inline seqcount_t * \ 5cdd25572a29e46 Ahmed S. Darwish 2020-09-04 191 __seqprop_##lockname##_ptr(seqcount_##lockname##_t *s) \ 55f3560df975f55 Ahmed S. Darwish 2020-07-20 192 { \ 55f3560df975f55 Ahmed S. Darwish 2020-07-20 193 return &s->seqcount; \ 55f3560df975f55 Ahmed S. Darwish 2020-07-20 194 } \ 55f3560df975f55 Ahmed S. Darwish 2020-07-20 195 \ 52ac39e5db5148f Ahmed S. Darwish 2020-09-04 196 static __always_inline unsigned \ 52ac39e5db5148f Ahmed S. Darwish 2020-09-04 197 __seqprop_##lockname##_sequence(const seqcount_##lockname##_t *s) \ 52ac39e5db5148f Ahmed S. Darwish 2020-09-04 198 { \ 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 199 unsigned seq = READ_ONCE(s->seqcount.sequence); \ 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 200 \ 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 201 if (!IS_ENABLED(CONFIG_PREEMPT_RT)) \ 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 202 return seq; \ 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 203 \ 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 204 if (preemptible && unlikely(seq & 1)) { \ 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 205 __SEQ_LOCK(lock_acquire); \ 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 206 __SEQ_LOCK(lockbase##_unlock(s->lock)); \ 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 207 \ 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 208 /* \ 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 209 * Re-read the sequence counter since the (possibly \ 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 210 * preempted) writer made progress. \ 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 211 */ \ 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 212 seq = READ_ONCE(s->seqcount.sequence); \ 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 213 } \ 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 214 \ 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 215 return seq; \ 52ac39e5db5148f Ahmed S. Darwish 2020-09-04 216 } \ 52ac39e5db5148f Ahmed S. Darwish 2020-09-04 217 \ a8772dccb2ec7b1 Peter Zijlstra 2020-07-23 218 static __always_inline bool \ 5cdd25572a29e46 Ahmed S. Darwish 2020-09-04 219 __seqprop_##lockname##_preemptible(const seqcount_##lockname##_t *s) \ 55f3560df975f55 Ahmed S. Darwish 2020-07-20 220 { \ 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 221 if (!IS_ENABLED(CONFIG_PREEMPT_RT)) \ a8772dccb2ec7b1 Peter Zijlstra 2020-07-23 222 return preemptible; \ 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 223 \ 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 224 /* PREEMPT_RT relies on the above LOCK+UNLOCK */ \ 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 225 return false; \ 55f3560df975f55 Ahmed S. Darwish 2020-07-20 226 } \ 55f3560df975f55 Ahmed S. Darwish 2020-07-20 227 \ a8772dccb2ec7b1 Peter Zijlstra 2020-07-23 228 static __always_inline void \ 5cdd25572a29e46 Ahmed S. Darwish 2020-09-04 229 __seqprop_##lockname##_assert(const seqcount_##lockname##_t *s) \ 55f3560df975f55 Ahmed S. Darwish 2020-07-20 230 { \ e55687fe5c1e484 Peter Zijlstra 2020-07-23 @231 __SEQ_LOCK(lockdep_assert_held(lockmember)); \ 55f3560df975f55 Ahmed S. Darwish 2020-07-20 232 } 55f3560df975f55 Ahmed S. Darwish 2020-07-20 233 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 234 #define __SEQ_RT IS_ENABLED(CONFIG_PREEMPT_RT) 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 235 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 236 SEQCOUNT_LOCKNAME(raw_spinlock, raw_spinlock_t, false, s->lock, raw_spin, raw_spin_lock(s->lock)) 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 237 SEQCOUNT_LOCKNAME(spinlock, spinlock_t, __SEQ_RT, s->lock, spin, spin_lock(s->lock)) 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 238 SEQCOUNT_LOCKNAME(rwlock, rwlock_t, __SEQ_RT, s->lock, read, read_lock(s->lock)) 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 @239 SEQCOUNT_LOCKNAME(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock)) 8117ab508f9c476 Ahmed S. Darwish 2020-09-04 @240 SEQCOUNT_LOCKNAME(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL)) a8772dccb2ec7b1 Peter Zijlstra 2020-07-23 241
:::::: The code at line 239 was first introduced by commit :::::: 8117ab508f9c476e0a10b9db7f4818f784cf3176 seqlock: seqcount_LOCKNAME_t: Introduce PREEMPT_RT support
:::::: TO: Ahmed S. Darwish <a.darwish@linutronix.de> :::::: CC: Peter Zijlstra <peterz@infradead.org>
--- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [unhandled content-type:application/gzip] | |