Hi "Ahmed, Thank you for the patch! Yet something to improve: [auto build test ERROR on a9232dc5607dbada801f2fe83ea307cda762969a] url: https://github.com/0day-ci/linux/commits/Ahmed-S-Darwish/seqlock-Extend-seqcount-API-with-associated-locks/20200721-003655 base: a9232dc5607dbada801f2fe83ea307cda762969a config: mips-allmodconfig (attached as .config) compiler: mips-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=mips 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/mips/include/asm/bug.h:42, from include/linux/bug.h:5, from include/linux/thread_info.h:12, from include/asm-generic/preempt.h:5, from ./arch/mips/include/generated/asm/preempt.h:1, from include/linux/preempt.h:78, from include/linux/spinlock.h:51, from include/linux/seqlock.h:15, from include/linux/time.h:6, from include/linux/compat.h:10, from arch/mips/kernel/asm-offsets.c:12: include/linux/seqlock.h: In function 'write_seqcount_begin_nested': >> include/asm-generic/percpu.h:31:40: error: implicit declaration of function 'raw_smp_processor_id' [-Werror=implicit-function-declaration] 31 | #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id()) | ^~~~~~~~~~~~~~~~~~~~ include/asm-generic/bug.h:144:27: note: in definition of macro 'WARN_ON_ONCE' 144 | int __ret_warn_once = !!(condition); \ | ^~~~~~~~~ include/linux/compiler.h:380:2: note: in expansion of macro '__compiletime_assert' 380 | __compiletime_assert(condition, msg, prefix, suffix) | ^~~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:392:2: note: in expansion of macro '_compiletime_assert' 392 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:405:2: note: in expansion of macro 'compiletime_assert' 405 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/linux/compiler.h:405:21: note: in expansion of macro '__native_word' 405 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~ include/linux/compiler.h:291:2: note: in expansion of macro 'compiletime_assert_rwonce_type' 291 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/percpu.h:119:10: note: in expansion of macro 'READ_ONCE' 119 | __ret = READ_ONCE(*raw_cpu_ptr(&(pcp))); \ | ^~~~~~~~~ include/linux/percpu-defs.h:231:2: note: in expansion of macro 'RELOC_HIDE' 231 | RELOC_HIDE((typeof(*(__p)) __kernel __force *)(__p), (__offset)) | ^~~~~~~~~~ include/asm-generic/percpu.h:44:31: note: in expansion of macro 'SHIFT_PERCPU_PTR' 44 | #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset) | ^~~~~~~~~~~~~~~~ include/asm-generic/percpu.h:31:25: note: in expansion of macro 'per_cpu_offset' 31 | #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id()) | ^~~~~~~~~~~~~~ include/asm-generic/percpu.h:44:53: note: in expansion of macro '__my_cpu_offset' 44 | #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset) | ^~~~~~~~~~~~~~~ include/linux/percpu-defs.h:242:2: note: in expansion of macro 'arch_raw_cpu_ptr' 242 | arch_raw_cpu_ptr(ptr); \ | ^~~~~~~~~~~~~~~~ include/asm-generic/percpu.h:119:21: note: in expansion of macro 'raw_cpu_ptr' 119 | __ret = READ_ONCE(*raw_cpu_ptr(&(pcp))); \ | ^~~~~~~~~~~ include/asm-generic/percpu.h:138:11: note: in expansion of macro '__this_cpu_generic_read_nopreempt' 138 | __ret = __this_cpu_generic_read_nopreempt(pcp); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/percpu.h:320:31: note: in expansion of macro 'this_cpu_generic_read' 320 | #define this_cpu_read_1(pcp) this_cpu_generic_read(pcp) | ^~~~~~~~~~~~~~~~~~~~~ include/linux/percpu-defs.h:321:23: note: in expansion of macro 'this_cpu_read_1' 321 | case 1: pscr_ret__ = stem##1(variable); break; \ | ^~~~ include/linux/percpu-defs.h:507:29: note: in expansion of macro '__pcpu_size_call_return' 507 | #define this_cpu_read(pcp) __pcpu_size_call_return(this_cpu_read_, pcp) | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/lockdep.h:565:9: note: in expansion of macro 'this_cpu_read' 565 | this_cpu_read(hardirqs_enabled))); \ | ^~~~~~~~~~~~~ include/linux/seqlock.h:285:2: note: in expansion of macro 'lockdep_assert_preemption_disabled' 285 | lockdep_assert_preemption_disabled(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/linux/smp.h:82, from arch/mips/include/asm/cpu-type.h:12, from arch/mips/include/asm/timex.h:19, from include/linux/timex.h:65, from include/linux/time32.h:13, from include/linux/time.h:74, from include/linux/compat.h:10, from arch/mips/kernel/asm-offsets.c:12: arch/mips/include/asm/smp.h: At top level: >> arch/mips/include/asm/smp.h:28:19: error: static declaration of 'raw_smp_processor_id' follows non-static declaration 28 | static inline int raw_smp_processor_id(void) | ^~~~~~~~~~~~~~~~~~~~ In file included from arch/mips/include/asm/bug.h:42, from include/linux/bug.h:5, from include/linux/thread_info.h:12, from include/asm-generic/preempt.h:5, from ./arch/mips/include/generated/asm/preempt.h:1, from include/linux/preempt.h:78, from include/linux/spinlock.h:51, from include/linux/seqlock.h:15, from include/linux/time.h:6, from include/linux/compat.h:10, from arch/mips/kernel/asm-offsets.c:12: include/asm-generic/percpu.h:31:40: note: previous implicit declaration of 'raw_smp_processor_id' was here 31 | #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id()) | ^~~~~~~~~~~~~~~~~~~~ include/asm-generic/bug.h:144:27: note: in definition of macro 'WARN_ON_ONCE' 144 | int __ret_warn_once = !!(condition); \ | ^~~~~~~~~ include/linux/compiler.h:380:2: note: in expansion of macro '__compiletime_assert' 380 | __compiletime_assert(condition, msg, prefix, suffix) | ^~~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:392:2: note: in expansion of macro '_compiletime_assert' 392 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:405:2: note: in expansion of macro 'compiletime_assert' 405 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/linux/compiler.h:405:21: note: in expansion of macro '__native_word' 405 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~ include/linux/compiler.h:291:2: note: in expansion of macro 'compiletime_assert_rwonce_type' 291 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/percpu.h:119:10: note: in expansion of macro 'READ_ONCE' 119 | __ret = READ_ONCE(*raw_cpu_ptr(&(pcp))); \ | ^~~~~~~~~ include/linux/percpu-defs.h:231:2: note: in expansion of macro 'RELOC_HIDE' 231 | RELOC_HIDE((typeof(*(__p)) __kernel __force *)(__p), (__offset)) | ^~~~~~~~~~ include/asm-generic/percpu.h:44:31: note: in expansion of macro 'SHIFT_PERCPU_PTR' 44 | #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset) | ^~~~~~~~~~~~~~~~ include/asm-generic/percpu.h:31:25: note: in expansion of macro 'per_cpu_offset' 31 | #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id()) | ^~~~~~~~~~~~~~ include/asm-generic/percpu.h:44:53: note: in expansion of macro '__my_cpu_offset' 44 | #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset) | ^~~~~~~~~~~~~~~ include/linux/percpu-defs.h:242:2: note: in expansion of macro 'arch_raw_cpu_ptr' 242 | arch_raw_cpu_ptr(ptr); \ | ^~~~~~~~~~~~~~~~ include/asm-generic/percpu.h:119:21: note: in expansion of macro 'raw_cpu_ptr' 119 | __ret = READ_ONCE(*raw_cpu_ptr(&(pcp))); \ | ^~~~~~~~~~~ include/asm-generic/percpu.h:138:11: note: in expansion of macro '__this_cpu_generic_read_nopreempt' 138 | __ret = __this_cpu_generic_read_nopreempt(pcp); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/percpu.h:320:31: note: in expansion of macro 'this_cpu_generic_read' 320 | #define this_cpu_read_1(pcp) this_cpu_generic_read(pcp) | ^~~~~~~~~~~~~~~~~~~~~ include/linux/percpu-defs.h:321:23: note: in expansion of macro 'this_cpu_read_1' 321 | case 1: pscr_ret__ = stem##1(variable); break; \ | ^~~~ include/linux/percpu-defs.h:507:29: note: in expansion of macro '__pcpu_size_call_return' 507 | #define this_cpu_read(pcp) __pcpu_size_call_return(this_cpu_read_, pcp) | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/lockdep.h:565:9: note: in expansion of macro 'this_cpu_read' 565 | this_cpu_read(hardirqs_enabled))); \ | ^~~~~~~~~~~~~ include/linux/seqlock.h:285:2: note: in expansion of macro 'lockdep_assert_preemption_disabled' 285 | lockdep_assert_preemption_disabled(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/mips/kernel/asm-offsets.c:26:6: warning: no previous prototype for 'output_ptreg_defines' [-Wmissing-prototypes] 26 | void output_ptreg_defines(void) | ^~~~~~~~~~~~~~~~~~~~ arch/mips/kernel/asm-offsets.c:78:6: warning: no previous prototype for 'output_task_defines' [-Wmissing-prototypes] 78 | void output_task_defines(void) | ^~~~~~~~~~~~~~~~~~~ arch/mips/kernel/asm-offsets.c:93:6: warning: no previous prototype for 'output_thread_info_defines' [-Wmissing-prototypes] 93 | void output_thread_info_defines(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ arch/mips/kernel/asm-offsets.c:110:6: warning: no previous prototype for 'output_thread_defines' [-Wmissing-prototypes] 110 | void output_thread_defines(void) | ^~~~~~~~~~~~~~~~~~~~~ arch/mips/kernel/asm-offsets.c:138:6: warning: no previous prototype for 'output_thread_fpu_defines' [-Wmissing-prototypes] 138 | void output_thread_fpu_defines(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~ arch/mips/kernel/asm-offsets.c:181:6: warning: no previous prototype for 'output_mm_defines' [-Wmissing-prototypes] 181 | void output_mm_defines(void) | ^~~~~~~~~~~~~~~~~ arch/mips/kernel/asm-offsets.c:220:6: warning: no previous prototype for 'output_sc_defines' [-Wmissing-prototypes] 220 | void output_sc_defines(void) | ^~~~~~~~~~~~~~~~~ arch/mips/kernel/asm-offsets.c:255:6: warning: no previous prototype for 'output_signal_defined' [-Wmissing-prototypes] 255 | void output_signal_defined(void) | ^~~~~~~~~~~~~~~~~~~~~ arch/mips/kernel/asm-offsets.c:322:6: warning: no previous prototype for 'output_pbe_defines' [-Wmissing-prototypes] 322 | void output_pbe_defines(void) | ^~~~~~~~~~~~~~~~~~ vim +/raw_smp_processor_id +31 include/asm-generic/percpu.h acdac87202a408 travis(a)sgi.com 2008-01-30 23 acdac87202a408 travis(a)sgi.com 2008-01-30 24 /* acdac87202a408 travis(a)sgi.com 2008-01-30 25 * Determine the offset for the currently active processor. acdac87202a408 travis(a)sgi.com 2008-01-30 26 * An arch may define __my_cpu_offset to provide a more effective acdac87202a408 travis(a)sgi.com 2008-01-30 27 * means of obtaining the offset to the per cpu variables of the acdac87202a408 travis(a)sgi.com 2008-01-30 28 * current processor. acdac87202a408 travis(a)sgi.com 2008-01-30 29 */ acdac87202a408 travis(a)sgi.com 2008-01-30 30 #ifndef __my_cpu_offset acdac87202a408 travis(a)sgi.com 2008-01-30 @31 #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id()) 1e8352784abaed Hugh Dickins 2008-02-23 32 #endif 1e8352784abaed Hugh Dickins 2008-02-23 33 #ifdef CONFIG_DEBUG_PREEMPT acdac87202a408 travis(a)sgi.com 2008-01-30 34 #define my_cpu_offset per_cpu_offset(smp_processor_id()) acdac87202a408 travis(a)sgi.com 2008-01-30 35 #else acdac87202a408 travis(a)sgi.com 2008-01-30 36 #define my_cpu_offset __my_cpu_offset acdac87202a408 travis(a)sgi.com 2008-01-30 37 #endif acdac87202a408 travis(a)sgi.com 2008-01-30 38 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org