public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Vadim Fedorenko <vadfed@meta.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Eduard Zingerman <eddyz87@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Vadim Fedorenko <vadim.fedorenko@linux.dev>,
	Mykola Lysenko <mykolal@fb.com>, Jakub Kicinski <kuba@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, x86@kernel.org,
	bpf@vger.kernel.org, Martin KaFai Lau <martin.lau@linux.dev>
Subject: Re: [PATCH bpf-next v4 2/4] bpf: add bpf_cpu_cycles_to_ns helper
Date: Fri, 8 Nov 2024 09:54:55 +0800	[thread overview]
Message-ID: <202411080952.bCRm4YHx-lkp@intel.com> (raw)
In-Reply-To: <20241107211206.2814069-2-vadfed@meta.com>

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/bpf-add-bpf_cpu_cycles_to_ns-helper/20241108-051950
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link:    https://lore.kernel.org/r/20241107211206.2814069-2-vadfed%40meta.com
patch subject: [PATCH bpf-next v4 2/4] bpf: add bpf_cpu_cycles_to_ns helper
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20241108/202411080952.bCRm4YHx-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241108/202411080952.bCRm4YHx-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411080952.bCRm4YHx-lkp@intel.com/

All errors (new ones prefixed by >>):

   kernel/bpf/helpers.c:3030:18: warning: extra tokens at end of #ifdef directive
    3030 | #ifdef IS_ENABLED(CONFIG_GENERIC_GETTIMEOFDAY)
         |                  ^
   kernel/bpf/helpers.c: In function 'bpf_get_cpu_cycles':
   kernel/bpf/helpers.c:3033:16: error: implicit declaration of function '__arch_get_hw_counter' [-Wimplicit-function-declaration]
    3033 |         return __arch_get_hw_counter(1, NULL);
         |                ^~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/helpers.c: In function 'bpf_cpu_cycles_to_ns':
   kernel/bpf/helpers.c:3038:38: error: implicit declaration of function '__arch_get_k_vdso_data' [-Wimplicit-function-declaration]
    3038 |         const struct vdso_data *vd = __arch_get_k_vdso_data();
         |                                      ^~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/helpers.c:3038:38: error: initialization of 'const struct vdso_data *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   kernel/bpf/helpers.c:3040:42: error: invalid use of undefined type 'const struct vdso_data'
    3040 |         return mul_u64_u32_shr(cycles, vd->mult, vd->shift);
         |                                          ^~
   kernel/bpf/helpers.c:3040:52: error: invalid use of undefined type 'const struct vdso_data'
    3040 |         return mul_u64_u32_shr(cycles, vd->mult, vd->shift);
         |                                                    ^~
   kernel/bpf/helpers.c: At top level:
   kernel/bpf/helpers.c:3135:18: warning: extra tokens at end of #ifdef directive
    3135 | #ifdef IS_ENABLED(CONFIG_GENERIC_GETTIMEOFDAY)
         |                  ^
   kernel/bpf/helpers.c: In function 'bpf_cpu_cycles_to_ns':
   kernel/bpf/helpers.c:3041:1: warning: control reaches end of non-void function [-Wreturn-type]
    3041 | }
         | ^


vim +3038 kernel/bpf/helpers.c

  3035	
  3036	__bpf_kfunc u64 bpf_cpu_cycles_to_ns(u64 cycles)
  3037	{
> 3038		const struct vdso_data *vd = __arch_get_k_vdso_data();
  3039	
  3040		return mul_u64_u32_shr(cycles, vd->mult, vd->shift);
  3041	}
  3042	#endif
  3043	__bpf_kfunc_end_defs();
  3044	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  reply	other threads:[~2024-11-08  1:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-07 21:12 [PATCH bpf-next v4 1/4] bpf: add bpf_get_cpu_cycles kfunc Vadim Fedorenko
2024-11-07 21:12 ` [PATCH bpf-next v4 2/4] bpf: add bpf_cpu_cycles_to_ns helper Vadim Fedorenko
2024-11-08  1:54   ` kernel test robot [this message]
2024-11-07 21:12 ` [PATCH bpf-next v4 3/4] selftests/bpf: add selftest to check rdtsc jit Vadim Fedorenko
2024-11-07 21:12 ` [PATCH bpf-next v4 4/4] selftests/bpf: add usage example for cpu cycles kfuncs Vadim Fedorenko
2024-11-08  1:54 ` [PATCH bpf-next v4 1/4] bpf: add bpf_get_cpu_cycles kfunc kernel test robot
2024-11-08  1:54 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202411080952.bCRm4YHx-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=kuba@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=mykolal@fb.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=tglx@linutronix.de \
    --cc=vadfed@meta.com \
    --cc=vadim.fedorenko@linux.dev \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox