Skip to contentSkip to conversation

arch/riscv/kernel/vdso/vgettimeofday.c:15:9: error: implicit declaration of function '__cvdso_clock_gettime'; did you mean '__vdso_clock_gettime'?

PATCH kernel test robot 1 participant 1 message Jul 8

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/thomas.weissschuh/linux.git b4/vdso-sysfs
head:   b186f35d4f4cdb6063d48192faa54c8ca0773543
commit: b186f35d4f4cdb6063d48192faa54c8ca0773543 [2/2] vDSO, kbuild: Provide debug variants of vDSO at runtime
config: riscv-randconfig-002-20260709 (https://download.01.org/0day-ci/archive/20260709/[email protected]/config)
compiler: riscv64-linux-gcc (GCC) 10.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260709/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

      55 |  struct riscv_hwprobe *end = pairs + pair_count;
         |                                    ^
   arch/riscv/kernel/vdso/hwprobe.c:71:29: error: 'RISCV_HWPROBE_WHICH_CPUS' undeclared (first use in this function)
      71 |  if (empty_cpus || flags != RISCV_HWPROBE_WHICH_CPUS || !avd->homogeneous_cpus)
         |                             ^~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/kernel/vdso/hwprobe.c:71:29: note: each undeclared identifier is reported only once for each function it appears in
   arch/riscv/kernel/vdso/hwprobe.c:71:61: error: 'const struct vdso_arch_data' has no member named 'homogeneous_cpus'
      71 |  if (empty_cpus || flags != RISCV_HWPROBE_WHICH_CPUS || !avd->homogeneous_cpus)
         |                                                             ^~
   arch/riscv/kernel/vdso/hwprobe.c:72:24: error: passing argument 1 of 'riscv_hwprobe' from incompatible pointer type [-Werror=incompatible-pointer-types]
      72 |   return riscv_hwprobe(pairs, pair_count, cpusetsize, cpus, flags);
         |                        ^~~~~
         |                        |
         |                        struct riscv_hwprobe *
   arch/riscv/kernel/vdso/hwprobe.c:11:48: note: expected 'struct riscv_hwprobe *' but argument is of type 'struct riscv_hwprobe *'
      11 | extern int riscv_hwprobe(struct riscv_hwprobe *pairs, size_t pair_count,
         |                          ~~~~~~~~~~~~~~~~~~~~~~^~~~~
   arch/riscv/kernel/vdso/hwprobe.c:75:35: error: invalid use of undefined type 'struct riscv_hwprobe'
      75 |   if (riscv_hwprobe_key_is_valid(p->key)) {
         |                                   ^~
   arch/riscv/kernel/vdso/hwprobe.c:76:11: error: variable 't' has initializer but incomplete type
      76 |    struct riscv_hwprobe t = {
         |           ^~~~~~~~~~~~~
   arch/riscv/kernel/vdso/hwprobe.c:77:6: error: 'struct riscv_hwprobe' has no member named 'key'
      77 |     .key = p->key,
         |      ^~~
   arch/riscv/kernel/vdso/hwprobe.c:77:13: error: invalid use of undefined type 'struct riscv_hwprobe'
      77 |     .key = p->key,
         |             ^~
   arch/riscv/kernel/vdso/hwprobe.c:77:12: warning: excess elements in struct initializer
      77 |     .key = p->key,
         |            ^
   arch/riscv/kernel/vdso/hwprobe.c:77:12: note: (near initialization for 't')
   arch/riscv/kernel/vdso/hwprobe.c:78:6: error: 'struct riscv_hwprobe' has no member named 'value'
      78 |     .value = avd->all_cpu_hwprobe_values[p->key],
         |      ^~~~~
   arch/riscv/kernel/vdso/hwprobe.c:78:17: error: 'const struct vdso_arch_data' has no member named 'all_cpu_hwprobe_values'
      78 |     .value = avd->all_cpu_hwprobe_values[p->key],
         |                 ^~
   arch/riscv/kernel/vdso/hwprobe.c:78:43: error: invalid use of undefined type 'struct riscv_hwprobe'
      78 |     .value = avd->all_cpu_hwprobe_values[p->key],
         |                                           ^~
   arch/riscv/kernel/vdso/hwprobe.c:78:14: warning: excess elements in struct initializer
      78 |     .value = avd->all_cpu_hwprobe_values[p->key],
         |              ^~~
   arch/riscv/kernel/vdso/hwprobe.c:78:14: note: (near initialization for 't')
   arch/riscv/kernel/vdso/hwprobe.c:76:25: error: storage size of 't' isn't known
      76 |    struct riscv_hwprobe t = {
         |                         ^
   arch/riscv/kernel/vdso/hwprobe.c:81:9: error: implicit declaration of function 'riscv_hwprobe_pair_cmp' [-Werror=implicit-function-declaration]
      81 |    if (!riscv_hwprobe_pair_cmp(&t, p))
         |         ^~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/kernel/vdso/hwprobe.c:76:25: warning: unused variable 't' [-Wunused-variable]
      76 |    struct riscv_hwprobe t = {
         |                         ^
   arch/riscv/kernel/vdso/hwprobe.c:85:5: error: invalid use of undefined type 'struct riscv_hwprobe'
      85 |    p->key = -1;
         |     ^~
   arch/riscv/kernel/vdso/hwprobe.c:86:5: error: invalid use of undefined type 'struct riscv_hwprobe'
      86 |    p->value = 0;
         |     ^~
   arch/riscv/kernel/vdso/hwprobe.c:88:4: error: increment of pointer to an incomplete type 'struct riscv_hwprobe'
      88 |   p++;
         |    ^~
   arch/riscv/kernel/vdso/hwprobe.c: At top level:
   arch/riscv/kernel/vdso/hwprobe.c:100:33: warning: 'struct riscv_hwprobe' declared inside parameter list will not be visible outside of this definition or declaration
     100 | int __vdso_riscv_hwprobe(struct riscv_hwprobe *pairs, size_t pair_count,
         |                                 ^~~~~~~~~~~~~
   arch/riscv/kernel/vdso/hwprobe.c:104:33: warning: 'struct riscv_hwprobe' declared inside parameter list will not be visible outside of this definition or declaration
     104 | int __vdso_riscv_hwprobe(struct riscv_hwprobe *pairs, size_t pair_count,
         |                                 ^~~~~~~~~~~~~
   arch/riscv/kernel/vdso/hwprobe.c:104:5: error: conflicting types for '__vdso_riscv_hwprobe'
     104 | int __vdso_riscv_hwprobe(struct riscv_hwprobe *pairs, size_t pair_count,
         |     ^~~~~~~~~~~~~~~~~~~~
   arch/riscv/kernel/vdso/hwprobe.c:100:5: note: previous declaration of '__vdso_riscv_hwprobe' was here
     100 | int __vdso_riscv_hwprobe(struct riscv_hwprobe *pairs, size_t pair_count,
         |     ^~~~~~~~~~~~~~~~~~~~
   arch/riscv/kernel/vdso/hwprobe.c: In function '__vdso_riscv_hwprobe':
   arch/riscv/kernel/vdso/hwprobe.c:108:14: error: 'RISCV_HWPROBE_WHICH_CPUS' undeclared (first use in this function)
     108 |  if (flags & RISCV_HWPROBE_WHICH_CPUS)
         |              ^~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/kernel/vdso/hwprobe.c:109:30: error: passing argument 1 of 'riscv_vdso_get_cpus' from incompatible pointer type [-Werror=incompatible-pointer-types]
     109 |   return riscv_vdso_get_cpus(pairs, pair_count, cpusetsize,
         |                              ^~~~~
         |                              |
         |                              struct riscv_hwprobe *
   arch/riscv/kernel/vdso/hwprobe.c:49:54: note: expected 'struct riscv_hwprobe *' but argument is of type 'struct riscv_hwprobe *'
      49 | static int riscv_vdso_get_cpus(struct riscv_hwprobe *pairs, size_t pair_count,
         |                                ~~~~~~~~~~~~~~~~~~~~~~^~~~~
   arch/riscv/kernel/vdso/hwprobe.c:112:31: error: passing argument 1 of 'riscv_vdso_get_values' from incompatible pointer type [-Werror=incompatible-pointer-types]
     112 |  return riscv_vdso_get_values(pairs, pair_count, cpusetsize,
         |                               ^~~~~
         |                               |
         |                               struct riscv_hwprobe *
   arch/riscv/kernel/vdso/hwprobe.c:15:56: note: expected 'struct riscv_hwprobe *' but argument is of type 'struct riscv_hwprobe *'
      15 | static int riscv_vdso_get_values(struct riscv_hwprobe *pairs, size_t pair_count,
         |                                  ~~~~~~~~~~~~~~~~~~~~~~^~~~~
   cc1: some warnings being treated as errors
   make[3]: *** [scripts/Makefile.build:289: arch/riscv/kernel/vdso/hwprobe.o] Error 1 shuffle=275821313
   arch/riscv/kernel/vdso/vgettimeofday.c: In function '__vdso_clock_gettime':
>> arch/riscv/kernel/vdso/vgettimeofday.c:15:9: error: implicit declaration of function '__cvdso_clock_gettime'; did you mean '__vdso_clock_gettime'? [-Werror=implicit-function-declaration]
      15 |  return __cvdso_clock_gettime(clock, ts);
         |         ^~~~~~~~~~~~~~~~~~~~~
         |         __vdso_clock_gettime
   arch/riscv/kernel/vdso/vgettimeofday.c: In function '__vdso_gettimeofday':
>> arch/riscv/kernel/vdso/vgettimeofday.c:20:9: error: implicit declaration of function '__cvdso_gettimeofday'; did you mean '__vdso_gettimeofday'? [-Werror=implicit-function-declaration]
      20 |  return __cvdso_gettimeofday(tv, tz);
         |         ^~~~~~~~~~~~~~~~~~~~
         |         __vdso_gettimeofday
   arch/riscv/kernel/vdso/vgettimeofday.c: In function '__vdso_clock_getres':
>> arch/riscv/kernel/vdso/vgettimeofday.c:25:9: error: implicit declaration of function '__cvdso_clock_getres'; did you mean '__vdso_clock_getres'? [-Werror=implicit-function-declaration]
      25 |  return __cvdso_clock_getres(clock_id, res);
         |         ^~~~~~~~~~~~~~~~~~~~
         |         __vdso_clock_getres

cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:289: arch/riscv/kernel/vdso/vgettimeofday.o] Error 1 shuffle=275821313 make[3]: Target 'arch/riscv/kernel/vdso/vdso.so.dbg' not remade because of errors. make[2]: *** [Makefile:1551: arch/riscv/kernel/vdso/vdso.so.dbg] Error 2 shuffle=275821313 make[2]: Target 'prepare' not remade because of errors.
make[1]: *** [Makefile:248: __sub-make] Error 2 shuffle=275821313
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:248: __sub-make] Error 2 shuffle=275821313
make: Target 'prepare' not remade because of errors.

vim +15 arch/riscv/kernel/vdso/vgettimeofday.c

ad5d1122b82fbd Vincent Chen 2020-06-09  12  
ad5d1122b82fbd Vincent Chen 2020-06-09  13  int __vdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts)
ad5d1122b82fbd Vincent Chen 2020-06-09  14  {
ad5d1122b82fbd Vincent Chen 2020-06-09 @15  	return __cvdso_clock_gettime(clock, ts);
ad5d1122b82fbd Vincent Chen 2020-06-09  16  }
ad5d1122b82fbd Vincent Chen 2020-06-09  17  
ad5d1122b82fbd Vincent Chen 2020-06-09  18  int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
ad5d1122b82fbd Vincent Chen 2020-06-09  19  {
ad5d1122b82fbd Vincent Chen 2020-06-09 @20  	return __cvdso_gettimeofday(tv, tz);
ad5d1122b82fbd Vincent Chen 2020-06-09  21  }
ad5d1122b82fbd Vincent Chen 2020-06-09  22  
ad5d1122b82fbd Vincent Chen 2020-06-09  23  int __vdso_clock_getres(clockid_t clock_id, struct __kernel_timespec *res)
ad5d1122b82fbd Vincent Chen 2020-06-09  24  {

ad5d1122b82fbd Vincent Chen 2020-06-09 @25 return __cvdso_clock_getres(clock_id, res);

:::::: The code at line 15 was first introduced by commit
:::::: ad5d1122b82fbd6a816d1b9d26ee01a6dbc2d757 riscv: use vDSO common flow to reduce the latency of the time-related functions

:::::: TO: Vincent Chen <[email protected]> :::::: CC: Palmer Dabbelt <[email protected]>

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