tree:
https://github.com/intel/linux-intel-lts.git 4.19/android_r
head: 8367d521b6ca9b77d18fbb56f936df6824f0843c
commit: f3a6a2a287f2413be23e2caeb8462d3659749582 [16639/25353] UPSTREAM: mips: vdso: Fix
source path
config: mips-ip28_defconfig (attached as .config)
compiler: mips64-linux-gcc (GCC) 11.2.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://github.com/intel/linux-intel-lts/commit/f3a6a2a287f2413be23e2caeb...
git remote add intel-lts
https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 4.19/android_r
git checkout f3a6a2a287f2413be23e2caeb8462d3659749582
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir
ARCH=mips SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from lib/vdso/gettimeofday.c:26,
from <command-line>:
arch/mips/include/asm/vdso/gettimeofday.h: In function
'clock_gettime_fallback':
> arch/mips/include/asm/vdso/gettimeofday.h:70:38: error:
'__NR_clock_gettime64' undeclared (first use in this function)
70 |
register long nr asm("v0") = __NR_clock_gettime64;
| ^~~~~~~~~~~~~~~~~~~~
arch/mips/include/asm/vdso/gettimeofday.h:70:38: note: each undeclared identifier is
reported only once for each function it appears in
arch/mips/include/asm/vdso/gettimeofday.h: In function
'clock_getres_fallback':
> arch/mips/include/asm/vdso/gettimeofday.h:94:38: error:
'__NR_clock_getres_time64' undeclared (first use in this function)
94
| register long nr asm("v0") = __NR_clock_getres_time64;
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from <command-line>:
lib/vdso/gettimeofday.c: In function '__cvdso_clock_gettime32':
lib/vdso/gettimeofday.c:113:20: error: invalid use of undefined type 'struct
compat_timespec'
113 | res->tv_sec = ts.tv_sec;
| ^~
lib/vdso/gettimeofday.c:114:20: error: invalid use of undefined type 'struct
compat_timespec'
114 | res->tv_nsec = ts.tv_nsec;
| ^~
lib/vdso/gettimeofday.c: In function '__cvdso_clock_getres_time32':
lib/vdso/gettimeofday.c:219:20: error: invalid use of undefined type 'struct
compat_timespec'
219 | res->tv_sec = ts.tv_sec;
| ^~
lib/vdso/gettimeofday.c:220:20: error: invalid use of undefined type 'struct
compat_timespec'
220 | res->tv_nsec = ts.tv_nsec;
| ^~
arch/mips/vdso/vgettimeofday.c: At top level:
arch/mips/vdso/vgettimeofday.c:14:5: warning: no previous prototype for
'__vdso_clock_gettime' [-Wmissing-prototypes]
14 | int __vdso_clock_gettime(clockid_t clock,
| ^~~~~~~~~~~~~~~~~~~~
arch/mips/vdso/vgettimeofday.c:20:5: warning: no previous prototype for
'__vdso_gettimeofday' [-Wmissing-prototypes]
20 | int __vdso_gettimeofday(struct __kernel_old_timeval *tv,
| ^~~~~~~~~~~~~~~~~~~
arch/mips/vdso/vgettimeofday.c:26:5: warning: no previous prototype for
'__vdso_clock_getres' [-Wmissing-prototypes]
26 | int __vdso_clock_getres(clockid_t clock_id,
| ^~~~~~~~~~~~~~~~~~~
arch/mips/vdso/vgettimeofday.c:32:5: warning: no previous prototype for
'__vdso_clock_gettime64' [-Wmissing-prototypes]
32 | int __vdso_clock_gettime64(clockid_t clock,
| ^~~~~~~~~~~~~~~~~~~~~~
vim +/__NR_clock_gettime64 +70 arch/mips/include/asm/vdso/gettimeofday.h
6b7f832e465d88 Vincenzo Frascino 2019-06-21 59
6b7f832e465d88 Vincenzo Frascino 2019-06-21 60 static __always_inline long
clock_gettime_fallback(
6b7f832e465d88 Vincenzo Frascino 2019-06-21 61 clockid_t _clkid,
6b7f832e465d88 Vincenzo Frascino 2019-06-21 62 struct __kernel_timespec *_ts)
6b7f832e465d88 Vincenzo Frascino 2019-06-21 63 {
6b7f832e465d88 Vincenzo Frascino 2019-06-21 64 register struct __kernel_timespec *ts
asm("a1") = _ts;
6b7f832e465d88 Vincenzo Frascino 2019-06-21 65 register clockid_t clkid
asm("a0") = _clkid;
6b7f832e465d88 Vincenzo Frascino 2019-06-21 66 register long ret asm("v0");
6b7f832e465d88 Vincenzo Frascino 2019-06-21 67 #if _MIPS_SIM == _MIPS_SIM_ABI64
6b7f832e465d88 Vincenzo Frascino 2019-06-21 68 register long nr asm("v0") =
__NR_clock_gettime;
6b7f832e465d88 Vincenzo Frascino 2019-06-21 69 #else
6b7f832e465d88 Vincenzo Frascino 2019-06-21 @70 register long nr asm("v0") =
__NR_clock_gettime64;
6b7f832e465d88 Vincenzo Frascino 2019-06-21 71 #endif
6b7f832e465d88 Vincenzo Frascino 2019-06-21 72 register long error
asm("a3");
6b7f832e465d88 Vincenzo Frascino 2019-06-21 73
6b7f832e465d88 Vincenzo Frascino 2019-06-21 74 asm volatile(
6b7f832e465d88 Vincenzo Frascino 2019-06-21 75 " syscall\n"
6b7f832e465d88 Vincenzo Frascino 2019-06-21 76 : "=r" (ret), "=r"
(error)
6b7f832e465d88 Vincenzo Frascino 2019-06-21 77 : "r" (clkid), "r"
(ts), "r" (nr)
6b7f832e465d88 Vincenzo Frascino 2019-06-21 78 : "$1", "$3",
"$8", "$9", "$10", "$11", "$12",
"$13",
6b7f832e465d88 Vincenzo Frascino 2019-06-21 79 "$14", "$15",
"$24", "$25", "hi", "lo", "memory");
6b7f832e465d88 Vincenzo Frascino 2019-06-21 80
6b7f832e465d88 Vincenzo Frascino 2019-06-21 81 return error ? -ret : ret;
6b7f832e465d88 Vincenzo Frascino 2019-06-21 82 }
6b7f832e465d88 Vincenzo Frascino 2019-06-21 83
23dea1cf7ed384 Vincenzo Frascino 2019-06-21 84 static __always_inline int
clock_getres_fallback(
23dea1cf7ed384 Vincenzo Frascino 2019-06-21 85 clockid_t _clkid,
23dea1cf7ed384 Vincenzo Frascino 2019-06-21 86 struct __kernel_timespec *_ts)
23dea1cf7ed384 Vincenzo Frascino 2019-06-21 87 {
23dea1cf7ed384 Vincenzo Frascino 2019-06-21 88 register struct __kernel_timespec *ts
asm("a1") = _ts;
23dea1cf7ed384 Vincenzo Frascino 2019-06-21 89 register clockid_t clkid
asm("a0") = _clkid;
23dea1cf7ed384 Vincenzo Frascino 2019-06-21 90 register long ret asm("v0");
23dea1cf7ed384 Vincenzo Frascino 2019-06-21 91 #if _MIPS_SIM == _MIPS_SIM_ABI64
23dea1cf7ed384 Vincenzo Frascino 2019-06-21 92 register long nr asm("v0") =
__NR_clock_getres;
23dea1cf7ed384 Vincenzo Frascino 2019-06-21 93 #else
23dea1cf7ed384 Vincenzo Frascino 2019-06-21 @94 register long nr asm("v0") =
__NR_clock_getres_time64;
23dea1cf7ed384 Vincenzo Frascino 2019-06-21 95 #endif
23dea1cf7ed384 Vincenzo Frascino 2019-06-21 96 register long error
asm("a3");
23dea1cf7ed384 Vincenzo Frascino 2019-06-21 97
23dea1cf7ed384 Vincenzo Frascino 2019-06-21 98 asm volatile(
23dea1cf7ed384 Vincenzo Frascino 2019-06-21 99 " syscall\n"
23dea1cf7ed384 Vincenzo Frascino 2019-06-21 100 : "=r" (ret), "=r"
(error)
23dea1cf7ed384 Vincenzo Frascino 2019-06-21 101 : "r" (clkid), "r"
(ts), "r" (nr)
23dea1cf7ed384 Vincenzo Frascino 2019-06-21 102 : "$1", "$3",
"$8", "$9", "$10", "$11", "$12",
"$13",
23dea1cf7ed384 Vincenzo Frascino 2019-06-21 103 "$14", "$15",
"$24", "$25", "hi", "lo", "memory");
23dea1cf7ed384 Vincenzo Frascino 2019-06-21 104
23dea1cf7ed384 Vincenzo Frascino 2019-06-21 105 return error ? -ret : ret;
23dea1cf7ed384 Vincenzo Frascino 2019-06-21 106 }
23dea1cf7ed384 Vincenzo Frascino 2019-06-21 107
:::::: The code at line 70 was first introduced by commit
:::::: 6b7f832e465d88fca5f3a07b85e664f962c88e0b BACKPORT: mips: Add support for generic
vDSO
:::::: TO: Vincenzo Frascino <vincenzo.frascino(a)arm.com>
:::::: CC: Alistair Delva <adelva(a)google.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org