Hi Vadim, kernel test robot noticed the following build errors: [auto build test ERROR on bpf-next/master] url: https://github.com/intel-lab-lkp/linux/commits/Vadim-Fedorenko/selftests-bpf-add-selftest-to-check-rdtsc-jit/20241025-045340 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master patch link: https://lore.kernel.org/r/20241024205113.762622-1-vadfed%40meta.com patch subject: [PATCH bpf-next v2 1/2] bpf: add bpf_get_hw_counter kfunc config: um-allyesconfig (https://download.01.org/0day-ci/archive/20241026/202410260919.mccgFynd-lkp@xxxxxxxxx/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241026/202410260919.mccgFynd-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/202410260919.mccgFynd-lkp@xxxxxxxxx/ All errors (new ones prefixed by >>): In file included from include/vdso/processor.h:10, from include/vdso/datapage.h:17, from kernel/bpf/helpers.c:26: >> arch/x86/include/asm/vdso/processor.h:11:29: error: redefinition of 'rep_nop' 11 | static __always_inline void rep_nop(void) | ^~~~~~~ In file included from include/linux/spinlock_up.h:8, from include/linux/spinlock.h:97, from include/linux/debugobjects.h:6, from include/linux/timer.h:8, from include/linux/workqueue.h:9, from include/linux/bpf.h:10, from kernel/bpf/helpers.c:4: arch/x86/um/asm/processor.h:25:29: note: previous definition of 'rep_nop' with type 'void(void)' 25 | static __always_inline void rep_nop(void) | ^~~~~~~ >> arch/x86/include/asm/vdso/processor.h:16:29: error: redefinition of 'cpu_relax' 16 | static __always_inline void cpu_relax(void) | ^~~~~~~~~ arch/x86/um/asm/processor.h:30:29: note: previous definition of 'cpu_relax' with type 'void(void)' 30 | static __always_inline void cpu_relax(void) | ^~~~~~~~~ In file included from include/uapi/linux/filter.h:9, from include/linux/bpf.h:8: arch/x86/include/asm/vdso/gettimeofday.h: In function '__arch_get_hw_counter': arch/x86/include/asm/vdso/gettimeofday.h:253:34: error: 'VDSO_CLOCKMODE_TSC' undeclared (first use in this function); did you mean 'VDSO_CLOCKMODE_MAX'? 253 | if (likely(clock_mode == VDSO_CLOCKMODE_TSC)) | ^~~~~~~~~~~~~~~~~~ include/linux/compiler.h:76:45: note: in definition of macro 'likely' 76 | # define likely(x) __builtin_expect(!!(x), 1) | ^ arch/x86/include/asm/vdso/gettimeofday.h:253:34: note: each undeclared identifier is reported only once for each function it appears in 253 | if (likely(clock_mode == VDSO_CLOCKMODE_TSC)) | ^~~~~~~~~~~~~~~~~~ include/linux/compiler.h:76:45: note: in definition of macro 'likely' 76 | # define likely(x) __builtin_expect(!!(x), 1) | ^ arch/x86/include/asm/vdso/gettimeofday.h: In function 'vdso_calc_ns': >> arch/x86/include/asm/vdso/gettimeofday.h:334:32: error: 'const struct vdso_data' has no member named 'max_cycles' 334 | if (unlikely(delta > vd->max_cycles)) { | ^~ include/linux/compiler.h:77:45: note: in definition of macro 'unlikely' 77 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for MODVERSIONS Depends on [n]: MODULES [=y] && !COMPILE_TEST [=y] Selected by [y]: - RANDSTRUCT_FULL [=y] && (CC_HAS_RANDSTRUCT [=n] || GCC_PLUGINS [=y]) && MODULES [=y] WARNING: unmet direct dependencies detected for GET_FREE_REGION Depends on [n]: SPARSEMEM [=n] Selected by [y]: - RESOURCE_KUNIT_TEST [=y] && RUNTIME_TESTING_MENU [=y] && KUNIT [=y] vim +/rep_nop +11 arch/x86/include/asm/vdso/processor.h abc22418db02b9 Vincenzo Frascino 2020-03-20 9 abc22418db02b9 Vincenzo Frascino 2020-03-20 10 /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ abc22418db02b9 Vincenzo Frascino 2020-03-20 @11 static __always_inline void rep_nop(void) abc22418db02b9 Vincenzo Frascino 2020-03-20 12 { abc22418db02b9 Vincenzo Frascino 2020-03-20 13 asm volatile("rep; nop" ::: "memory"); abc22418db02b9 Vincenzo Frascino 2020-03-20 14 } abc22418db02b9 Vincenzo Frascino 2020-03-20 15 abc22418db02b9 Vincenzo Frascino 2020-03-20 @16 static __always_inline void cpu_relax(void) abc22418db02b9 Vincenzo Frascino 2020-03-20 17 { abc22418db02b9 Vincenzo Frascino 2020-03-20 18 rep_nop(); abc22418db02b9 Vincenzo Frascino 2020-03-20 19 } abc22418db02b9 Vincenzo Frascino 2020-03-20 20 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki