tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2 head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324 commit: 80b4a6d3c8c2325e072a36e473706f5165e0e9fb [348/364] sched/headers, locking/mutexes: Optimize header dependencies config: ia64-allmodconfig (attached as .config) compiler: ia64-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=80b4a6d3c8c2325e072a36e473706f5165e0e9fb 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 80b4a6d3c8c2325e072a36e473706f5165e0e9fb # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64 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 ./arch/ia64/include/generated/asm/preempt.h:1, from include/linux/preempt.h:80, from include/linux/rcupdate.h:29, from include/linux/rculist.h:11, from include/linux/sched/signal.h:7, from arch/ia64/kernel/asm-offsets.c:10: 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/seqlock.h:20, from include/linux/mm_types.h:17, from include/linux/page-flags.h:13, from arch/ia64/include/asm/uaccess.h:37, from include/linux/uaccess.h:13, from include/linux/sched/task.h:11, from include/linux/sched/signal.h:12, from arch/ia64/kernel/asm-offsets.c:10: include/linux/ww_mutex.h: In function 'ww_acquire_done': >> include/linux/ww_mutex.h:150:2: error: implicit declaration of function 'DEBUG_LOCKS_WARN_ON' [-Werror=implicit-function-declaration] 150 | DEBUG_LOCKS_WARN_ON(ctx->done_acquire); | ^~~~~~~~~~~~~~~~~~~ In file included from : include/linux/sched/task.h: In function 'arch_thread_struct_whitelist': 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/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof' 17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) | ^~~~~~~~~~~~~~~~~~~ include/linux/sched/task.h:154:34: note: in expansion of macro 'offsetof' 154 | *size = arch_task_struct_size - offsetof(struct task_struct, thread); | ^~~~~~~~ In file included from include/linux/sched/signal.h:13, from arch/ia64/kernel/asm-offsets.c:10: include/linux/sched/thread_info_api.h: At top level: include/linux/sched/thread_info_api.h:42:59: error: macro "current_thread_info" passed 1 arguments, but takes just 0 42 | static inline struct thread_info *current_thread_info(void) | ^ In file included from include/linux/thread_info.h:52, from include/asm-generic/preempt.h:5, from ./arch/ia64/include/generated/asm/preempt.h:1, from include/linux/preempt.h:80, from include/linux/rcupdate.h:29, from include/linux/rculist.h:11, from include/linux/sched/signal.h:7, from arch/ia64/kernel/asm-offsets.c:10: arch/ia64/include/asm/thread_info.h:62: note: macro "current_thread_info" defined here 62 | #define current_thread_info() ((struct thread_info *) 0) | In file included from include/linux/sched/signal.h:13, from arch/ia64/kernel/asm-offsets.c:10: include/linux/sched/thread_info_api.h:43:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 43 | { | ^ In file included from include/linux/irq.h:21, from arch/ia64/include/asm/hardirq.h:19, from include/linux/hardirq.h:10, from include/linux/interrupt.h:11, from include/linux/kernel_stat.h:9, from include/linux/sched/signal.h:21, from arch/ia64/kernel/asm-offsets.c:10: include/linux/slab.h:20:10: fatal error: asm/page_types.h: No such file or directory 20 | #include | ^~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors compilation terminated. -- In file included from ./arch/ia64/include/generated/asm/preempt.h:1, from include/linux/preempt.h:80, from include/linux/rcupdate.h:29, from include/linux/rculist.h:11, from include/linux/sched/signal.h:7, from arch/ia64/kernel/asm-offsets.c:10: 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/seqlock.h:20, from include/linux/mm_types.h:17, from include/linux/page-flags.h:13, from arch/ia64/include/asm/uaccess.h:37, from include/linux/uaccess.h:13, from include/linux/sched/task.h:11, from include/linux/sched/signal.h:12, from arch/ia64/kernel/asm-offsets.c:10: include/linux/ww_mutex.h: In function 'ww_acquire_done': >> include/linux/ww_mutex.h:150:2: error: implicit declaration of function 'DEBUG_LOCKS_WARN_ON' [-Werror=implicit-function-declaration] 150 | DEBUG_LOCKS_WARN_ON(ctx->done_acquire); | ^~~~~~~~~~~~~~~~~~~ In file included from : include/linux/sched/task.h: In function 'arch_thread_struct_whitelist': 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/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof' 17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) | ^~~~~~~~~~~~~~~~~~~ include/linux/sched/task.h:154:34: note: in expansion of macro 'offsetof' 154 | *size = arch_task_struct_size - offsetof(struct task_struct, thread); | ^~~~~~~~ In file included from include/linux/sched/signal.h:13, from arch/ia64/kernel/asm-offsets.c:10: include/linux/sched/thread_info_api.h: At top level: include/linux/sched/thread_info_api.h:42:59: error: macro "current_thread_info" passed 1 arguments, but takes just 0 42 | static inline struct thread_info *current_thread_info(void) | ^ In file included from include/linux/thread_info.h:52, from include/asm-generic/preempt.h:5, from ./arch/ia64/include/generated/asm/preempt.h:1, from include/linux/preempt.h:80, from include/linux/rcupdate.h:29, from include/linux/rculist.h:11, from include/linux/sched/signal.h:7, from arch/ia64/kernel/asm-offsets.c:10: arch/ia64/include/asm/thread_info.h:62: note: macro "current_thread_info" defined here 62 | #define current_thread_info() ((struct thread_info *) 0) | In file included from include/linux/sched/signal.h:13, from arch/ia64/kernel/asm-offsets.c:10: include/linux/sched/thread_info_api.h:43:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 43 | { | ^ In file included from include/linux/irq.h:21, from arch/ia64/include/asm/hardirq.h:19, from include/linux/hardirq.h:10, from include/linux/interrupt.h:11, from include/linux/kernel_stat.h:9, from include/linux/sched/signal.h:21, from arch/ia64/kernel/asm-offsets.c:10: include/linux/slab.h:20:10: fatal error: asm/page_types.h: No such file or directory 20 | #include | ^~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors compilation terminated. make[2]: *** [scripts/Makefile.build:117: arch/ia64/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. -- In file included from ./arch/ia64/include/generated/asm/preempt.h:1, from include/linux/preempt.h:80, from include/linux/rcupdate.h:29, from include/linux/rculist.h:11, from include/linux/sched/signal.h:7, from arch/ia64/kernel/asm-offsets.c:10: 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/seqlock.h:20, from include/linux/mm_types.h:17, from include/linux/page-flags.h:13, from arch/ia64/include/asm/uaccess.h:37, from include/linux/uaccess.h:13, from include/linux/sched/task.h:11, from include/linux/sched/signal.h:12, from arch/ia64/kernel/asm-offsets.c:10: include/linux/ww_mutex.h: In function 'ww_acquire_done': >> include/linux/ww_mutex.h:150:2: error: implicit declaration of function 'DEBUG_LOCKS_WARN_ON' [-Werror=implicit-function-declaration] 150 | DEBUG_LOCKS_WARN_ON(ctx->done_acquire); | ^~~~~~~~~~~~~~~~~~~ In file included from : include/linux/sched/task.h: In function 'arch_thread_struct_whitelist': 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/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof' 17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) | ^~~~~~~~~~~~~~~~~~~ include/linux/sched/task.h:154:34: note: in expansion of macro 'offsetof' 154 | *size = arch_task_struct_size - offsetof(struct task_struct, thread); | ^~~~~~~~ In file included from include/linux/sched/signal.h:13, from arch/ia64/kernel/asm-offsets.c:10: include/linux/sched/thread_info_api.h: At top level: include/linux/sched/thread_info_api.h:42:59: error: macro "current_thread_info" passed 1 arguments, but takes just 0 42 | static inline struct thread_info *current_thread_info(void) | ^ In file included from include/linux/thread_info.h:52, from include/asm-generic/preempt.h:5, from ./arch/ia64/include/generated/asm/preempt.h:1, from include/linux/preempt.h:80, from include/linux/rcupdate.h:29, from include/linux/rculist.h:11, from include/linux/sched/signal.h:7, from arch/ia64/kernel/asm-offsets.c:10: arch/ia64/include/asm/thread_info.h:62: note: macro "current_thread_info" defined here 62 | #define current_thread_info() ((struct thread_info *) 0) | In file included from include/linux/sched/signal.h:13, from arch/ia64/kernel/asm-offsets.c:10: include/linux/sched/thread_info_api.h:43:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 43 | { | ^ In file included from include/linux/irq.h:21, from arch/ia64/include/asm/hardirq.h:19, from include/linux/hardirq.h:10, from include/linux/interrupt.h:11, from include/linux/kernel_stat.h:9, from include/linux/sched/signal.h:21, from arch/ia64/kernel/asm-offsets.c:10: include/linux/slab.h:20:10: fatal error: asm/page_types.h: No such file or directory 20 | #include | ^~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors compilation terminated. make[2]: *** [scripts/Makefile.build:117: arch/ia64/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 'prepare' not remade because of errors. make: *** [Makefile:215: __sub-make] Error 2 make: Target 'prepare' not remade because of errors. vim +/DEBUG_LOCKS_WARN_ON +150 include/linux/ww_mutex.h 1b375dc3071018 Maarten Lankhorst 2013-07-05 133 1b375dc3071018 Maarten Lankhorst 2013-07-05 134 /** 1b375dc3071018 Maarten Lankhorst 2013-07-05 135 * ww_acquire_done - marks the end of the acquire phase 1b375dc3071018 Maarten Lankhorst 2013-07-05 136 * @ctx: the acquire context 1b375dc3071018 Maarten Lankhorst 2013-07-05 137 * 1b375dc3071018 Maarten Lankhorst 2013-07-05 138 * Marks the end of the acquire phase, any further w/w mutex lock calls using 1b375dc3071018 Maarten Lankhorst 2013-07-05 139 * this context are forbidden. 1b375dc3071018 Maarten Lankhorst 2013-07-05 140 * 1b375dc3071018 Maarten Lankhorst 2013-07-05 141 * Calling this function is optional, it is just useful to document w/w mutex 1b375dc3071018 Maarten Lankhorst 2013-07-05 142 * code and clearly designated the acquire phase from actually using the locked 1b375dc3071018 Maarten Lankhorst 2013-07-05 143 * data structures. 1b375dc3071018 Maarten Lankhorst 2013-07-05 144 */ 1b375dc3071018 Maarten Lankhorst 2013-07-05 145 static inline void ww_acquire_done(struct ww_acquire_ctx *ctx) 1b375dc3071018 Maarten Lankhorst 2013-07-05 146 { 1b375dc3071018 Maarten Lankhorst 2013-07-05 147 #ifdef CONFIG_DEBUG_MUTEXES 1b375dc3071018 Maarten Lankhorst 2013-07-05 148 lockdep_assert_held(ctx); 1b375dc3071018 Maarten Lankhorst 2013-07-05 149 1b375dc3071018 Maarten Lankhorst 2013-07-05 @150 DEBUG_LOCKS_WARN_ON(ctx->done_acquire); 1b375dc3071018 Maarten Lankhorst 2013-07-05 151 ctx->done_acquire = 1; 1b375dc3071018 Maarten Lankhorst 2013-07-05 152 #endif 1b375dc3071018 Maarten Lankhorst 2013-07-05 153 } 1b375dc3071018 Maarten Lankhorst 2013-07-05 154 :::::: The code at line 150 was first introduced by commit :::::: 1b375dc30710180c4b88cc59caba6e3481ec5c8b mutex: Move ww_mutex definitions to ww_mutex.h :::::: TO: Maarten Lankhorst :::::: CC: Ingo Molnar --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org