linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* arch/nds32/kernel/vdso/gettimeofday.c:246:13: error: no previous prototype for '__vdso_gettimeofday'
@ 2021-11-09  5:17 kernel test robot
  2021-11-09  7:46 ` Stephen Rothwell
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2021-11-09  5:17 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 9561 bytes --]

Hi Stephen,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   d2f38a3c6507b2520101f9a3807ed98f1bdc545a
commit: 20fbb11fe4ea99e02d77824613f1438bea456683 don't make the syscall checking produce errors from warnings
date:   9 weeks ago
config: nds32-allyesconfig (attached as .config)
compiler: nds32le-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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=20fbb11fe4ea99e02d77824613f1438bea456683
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 20fbb11fe4ea99e02d77824613f1438bea456683
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nds32 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   <stdin>:1515:2: warning: #warning syscall clone3 not implemented [-Wcpp]
   arch/nds32/kernel/vdso/gettimeofday.c:158:13: error: no previous prototype for '__vdso_clock_gettime' [-Werror=missing-prototypes]
     158 | notrace int __vdso_clock_gettime(clockid_t clkid, struct __kernel_old_timespec *ts)
         |             ^~~~~~~~~~~~~~~~~~~~
   arch/nds32/kernel/vdso/gettimeofday.c:206:13: error: no previous prototype for '__vdso_clock_getres' [-Werror=missing-prototypes]
     206 | notrace int __vdso_clock_getres(clockid_t clk_id, struct __kernel_old_timespec *res)
         |             ^~~~~~~~~~~~~~~~~~~
>> arch/nds32/kernel/vdso/gettimeofday.c:246:13: error: no previous prototype for '__vdso_gettimeofday' [-Werror=missing-prototypes]
     246 | notrace int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
         |             ^~~~~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors
   make[2]: *** [scripts/Makefile.build:277: arch/nds32/kernel/vdso/gettimeofday.o] Error 1
   make[2]: Target 'include/generated/vdso-offsets.h' not remade because of errors.
   make[1]: *** [arch/nds32/Makefile:63: vdso_prepare] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:219: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +/__vdso_gettimeofday +246 arch/nds32/kernel/vdso/gettimeofday.c

eefacd1dfe38a3 Greentime Hu      2017-10-25  157  
82210fc778982d Arnd Bergmann     2019-10-27 @158  notrace int __vdso_clock_gettime(clockid_t clkid, struct __kernel_old_timespec *ts)
eefacd1dfe38a3 Greentime Hu      2017-10-25  159  {
eefacd1dfe38a3 Greentime Hu      2017-10-25  160  	struct vdso_data *vdata;
eefacd1dfe38a3 Greentime Hu      2017-10-25  161  	int ret = -1;
eefacd1dfe38a3 Greentime Hu      2017-10-25  162  
eefacd1dfe38a3 Greentime Hu      2017-10-25  163  	vdata = __get_datapage();
eefacd1dfe38a3 Greentime Hu      2017-10-25  164  	if (vdata->cycle_count_offset == EMPTY_REG_OFFSET)
eefacd1dfe38a3 Greentime Hu      2017-10-25  165  		return clock_gettime_fallback(clkid, ts);
eefacd1dfe38a3 Greentime Hu      2017-10-25  166  
eefacd1dfe38a3 Greentime Hu      2017-10-25  167  	switch (clkid) {
eefacd1dfe38a3 Greentime Hu      2017-10-25  168  	case CLOCK_REALTIME_COARSE:
eefacd1dfe38a3 Greentime Hu      2017-10-25  169  		ret = do_realtime_coarse(ts, vdata);
eefacd1dfe38a3 Greentime Hu      2017-10-25  170  		break;
eefacd1dfe38a3 Greentime Hu      2017-10-25  171  	case CLOCK_MONOTONIC_COARSE:
eefacd1dfe38a3 Greentime Hu      2017-10-25  172  		ret = do_monotonic_coarse(ts, vdata);
eefacd1dfe38a3 Greentime Hu      2017-10-25  173  		break;
eefacd1dfe38a3 Greentime Hu      2017-10-25  174  	case CLOCK_REALTIME:
eefacd1dfe38a3 Greentime Hu      2017-10-25  175  		ret = do_realtime(ts, vdata);
eefacd1dfe38a3 Greentime Hu      2017-10-25  176  		break;
eefacd1dfe38a3 Greentime Hu      2017-10-25  177  	case CLOCK_MONOTONIC:
eefacd1dfe38a3 Greentime Hu      2017-10-25  178  		ret = do_monotonic(ts, vdata);
eefacd1dfe38a3 Greentime Hu      2017-10-25  179  		break;
eefacd1dfe38a3 Greentime Hu      2017-10-25  180  	default:
eefacd1dfe38a3 Greentime Hu      2017-10-25  181  		break;
eefacd1dfe38a3 Greentime Hu      2017-10-25  182  	}
eefacd1dfe38a3 Greentime Hu      2017-10-25  183  
eefacd1dfe38a3 Greentime Hu      2017-10-25  184  	if (ret)
eefacd1dfe38a3 Greentime Hu      2017-10-25  185  		ret = clock_gettime_fallback(clkid, ts);
eefacd1dfe38a3 Greentime Hu      2017-10-25  186  
eefacd1dfe38a3 Greentime Hu      2017-10-25  187  	return ret;
eefacd1dfe38a3 Greentime Hu      2017-10-25  188  }
eefacd1dfe38a3 Greentime Hu      2017-10-25  189  
eefacd1dfe38a3 Greentime Hu      2017-10-25  190  static notrace int clock_getres_fallback(clockid_t _clk_id,
82210fc778982d Arnd Bergmann     2019-10-27  191  					  struct __kernel_old_timespec *_res)
eefacd1dfe38a3 Greentime Hu      2017-10-25  192  {
eefacd1dfe38a3 Greentime Hu      2017-10-25  193  	register clockid_t clk_id asm("$r0") = _clk_id;
82210fc778982d Arnd Bergmann     2019-10-27  194  	register struct __kernel_old_timespec *res asm("$r1") = _res;
eefacd1dfe38a3 Greentime Hu      2017-10-25  195  	register int ret asm("$r0");
eefacd1dfe38a3 Greentime Hu      2017-10-25  196  
eefacd1dfe38a3 Greentime Hu      2017-10-25  197  	asm volatile ("movi	$r15, %3\n"
eefacd1dfe38a3 Greentime Hu      2017-10-25  198  		      "syscall	0x0\n"
eefacd1dfe38a3 Greentime Hu      2017-10-25  199  		      :"=r" (ret)
eefacd1dfe38a3 Greentime Hu      2017-10-25  200  		      :"r"(clk_id), "r"(res), "i"(__NR_clock_getres)
eefacd1dfe38a3 Greentime Hu      2017-10-25  201  		      :"$r15", "memory");
eefacd1dfe38a3 Greentime Hu      2017-10-25  202  
eefacd1dfe38a3 Greentime Hu      2017-10-25  203  	return ret;
eefacd1dfe38a3 Greentime Hu      2017-10-25  204  }
eefacd1dfe38a3 Greentime Hu      2017-10-25  205  
82210fc778982d Arnd Bergmann     2019-10-27  206  notrace int __vdso_clock_getres(clockid_t clk_id, struct __kernel_old_timespec *res)
eefacd1dfe38a3 Greentime Hu      2017-10-25  207  {
af9abd65983cf3 Vincenzo Frascino 2019-04-01  208  	struct vdso_data *vdata = __get_datapage();
af9abd65983cf3 Vincenzo Frascino 2019-04-01  209  
eefacd1dfe38a3 Greentime Hu      2017-10-25  210  	if (res == NULL)
eefacd1dfe38a3 Greentime Hu      2017-10-25  211  		return 0;
eefacd1dfe38a3 Greentime Hu      2017-10-25  212  	switch (clk_id) {
eefacd1dfe38a3 Greentime Hu      2017-10-25  213  	case CLOCK_REALTIME:
eefacd1dfe38a3 Greentime Hu      2017-10-25  214  	case CLOCK_MONOTONIC:
eefacd1dfe38a3 Greentime Hu      2017-10-25  215  	case CLOCK_MONOTONIC_RAW:
eefacd1dfe38a3 Greentime Hu      2017-10-25  216  		res->tv_sec = 0;
af9abd65983cf3 Vincenzo Frascino 2019-04-01  217  		res->tv_nsec = vdata->hrtimer_res;
eefacd1dfe38a3 Greentime Hu      2017-10-25  218  		break;
eefacd1dfe38a3 Greentime Hu      2017-10-25  219  	case CLOCK_REALTIME_COARSE:
eefacd1dfe38a3 Greentime Hu      2017-10-25  220  	case CLOCK_MONOTONIC_COARSE:
eefacd1dfe38a3 Greentime Hu      2017-10-25  221  		res->tv_sec = 0;
eefacd1dfe38a3 Greentime Hu      2017-10-25  222  		res->tv_nsec = CLOCK_COARSE_RES;
eefacd1dfe38a3 Greentime Hu      2017-10-25  223  		break;
eefacd1dfe38a3 Greentime Hu      2017-10-25  224  	default:
eefacd1dfe38a3 Greentime Hu      2017-10-25  225  		return clock_getres_fallback(clk_id, res);
eefacd1dfe38a3 Greentime Hu      2017-10-25  226  	}
eefacd1dfe38a3 Greentime Hu      2017-10-25  227  	return 0;
eefacd1dfe38a3 Greentime Hu      2017-10-25  228  }
eefacd1dfe38a3 Greentime Hu      2017-10-25  229  
ddccf40fe82b7a Arnd Bergmann     2017-11-23  230  static notrace inline int gettimeofday_fallback(struct __kernel_old_timeval *_tv,
eefacd1dfe38a3 Greentime Hu      2017-10-25  231  						struct timezone *_tz)
eefacd1dfe38a3 Greentime Hu      2017-10-25  232  {
ddccf40fe82b7a Arnd Bergmann     2017-11-23  233  	register struct __kernel_old_timeval *tv asm("$r0") = _tv;
eefacd1dfe38a3 Greentime Hu      2017-10-25  234  	register struct timezone *tz asm("$r1") = _tz;
eefacd1dfe38a3 Greentime Hu      2017-10-25  235  	register int ret asm("$r0");
eefacd1dfe38a3 Greentime Hu      2017-10-25  236  
eefacd1dfe38a3 Greentime Hu      2017-10-25  237  	asm volatile ("movi	$r15, %3\n"
eefacd1dfe38a3 Greentime Hu      2017-10-25  238  		      "syscall	0x0\n"
eefacd1dfe38a3 Greentime Hu      2017-10-25  239  		      :"=r" (ret)
eefacd1dfe38a3 Greentime Hu      2017-10-25  240  		      :"r"(tv), "r"(tz), "i"(__NR_gettimeofday)
eefacd1dfe38a3 Greentime Hu      2017-10-25  241  		      :"$r15", "memory");
eefacd1dfe38a3 Greentime Hu      2017-10-25  242  
eefacd1dfe38a3 Greentime Hu      2017-10-25  243  	return ret;
eefacd1dfe38a3 Greentime Hu      2017-10-25  244  }
eefacd1dfe38a3 Greentime Hu      2017-10-25  245  
ddccf40fe82b7a Arnd Bergmann     2017-11-23 @246  notrace int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)

:::::: The code at line 246 was first introduced by commit
:::::: ddccf40fe82b7ac7c44b186ec4b6d1d1bbc2cbff y2038: vdso: change timeval to __kernel_old_timeval

:::::: TO: Arnd Bergmann <arnd@arndb.de>
:::::: CC: Arnd Bergmann <arnd@arndb.de>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 61630 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: arch/nds32/kernel/vdso/gettimeofday.c:246:13: error: no previous prototype for '__vdso_gettimeofday'
  2021-11-09  5:17 arch/nds32/kernel/vdso/gettimeofday.c:246:13: error: no previous prototype for '__vdso_gettimeofday' kernel test robot
@ 2021-11-09  7:46 ` Stephen Rothwell
  2021-11-12  3:39   ` [kbuild-all] " Chen, Rong A
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2021-11-09  7:46 UTC (permalink / raw)
  To: kernel test robot; +Cc: kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1340 bytes --]

Hi all,

On Tue, 9 Nov 2021 13:17:19 +0800 kernel test robot <lkp@intel.com> wrote:
>
> First bad commit (maybe != root cause):
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   d2f38a3c6507b2520101f9a3807ed98f1bdc545a
> commit: 20fbb11fe4ea99e02d77824613f1438bea456683 don't make the syscall checking produce errors from warnings
> date:   9 weeks ago

Its very unlikely to be that commit (since all it does it turn some
errors into warnings):

commit 20fbb11fe4ea99e02d77824613f1438bea456683
Author: Stephen Rothwell <sfr@canb.auug.org.au>
Date:   Mon Sep 6 15:47:02 2021 +1000

    don't make the syscall checking produce errors from warnings
    
    Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

diff --git a/scripts/checksyscalls.sh b/scripts/checksyscalls.sh
index b7609958ee36..fd9777f63f14 100755
--- a/scripts/checksyscalls.sh
+++ b/scripts/checksyscalls.sh
@@ -266,4 +266,4 @@ syscall_list() {
 }
 
 (ignore_list && syscall_list $(dirname $0)/../arch/x86/entry/syscalls/syscall_32.tbl) | \
-$* -E -x c - > /dev/null
+$* -Wno-error -E -x c - > /dev/null


When did this start failing?  That commit has been in Linus' tree for 9
weeks ...
-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [kbuild-all] Re: arch/nds32/kernel/vdso/gettimeofday.c:246:13: error: no previous prototype for '__vdso_gettimeofday'
  2021-11-09  7:46 ` Stephen Rothwell
@ 2021-11-12  3:39   ` Chen, Rong A
  0 siblings, 0 replies; 3+ messages in thread
From: Chen, Rong A @ 2021-11-12  3:39 UTC (permalink / raw)
  To: Stephen Rothwell, kernel test robot; +Cc: kbuild-all, linux-kernel



On 11/9/2021 3:46 PM, Stephen Rothwell wrote:
> Hi all,
> 
> On Tue, 9 Nov 2021 13:17:19 +0800 kernel test robot <lkp@intel.com> wrote:
>>
>> First bad commit (maybe != root cause):
>>
>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>> head:   d2f38a3c6507b2520101f9a3807ed98f1bdc545a
>> commit: 20fbb11fe4ea99e02d77824613f1438bea456683 don't make the syscall checking produce errors from warnings
>> date:   9 weeks ago
> 
> Its very unlikely to be that commit (since all it does it turn some
> errors into warnings):
> 

Hi Stephen,

Thanks for the feedback, we'll ignore the commit in the CI system.

Best Regards,
Rong Chen

> commit 20fbb11fe4ea99e02d77824613f1438bea456683
> Author: Stephen Rothwell <sfr@canb.auug.org.au>
> Date:   Mon Sep 6 15:47:02 2021 +1000
> 
>      don't make the syscall checking produce errors from warnings
>      
>      Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
>      Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
> 
> diff --git a/scripts/checksyscalls.sh b/scripts/checksyscalls.sh
> index b7609958ee36..fd9777f63f14 100755
> --- a/scripts/checksyscalls.sh
> +++ b/scripts/checksyscalls.sh
> @@ -266,4 +266,4 @@ syscall_list() {
>   }
>   
>   (ignore_list && syscall_list $(dirname $0)/../arch/x86/entry/syscalls/syscall_32.tbl) | \
> -$* -E -x c - > /dev/null
> +$* -Wno-error -E -x c - > /dev/null
> 
> 
> When did this start failing?  That commit has been in Linus' tree for 9
> weeks ...
> 
> 
> _______________________________________________
> kbuild-all mailing list -- kbuild-all@lists.01.org
> To unsubscribe send an email to kbuild-all-leave@lists.01.org
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-12  3:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-09  5:17 arch/nds32/kernel/vdso/gettimeofday.c:246:13: error: no previous prototype for '__vdso_gettimeofday' kernel test robot
2021-11-09  7:46 ` Stephen Rothwell
2021-11-12  3:39   ` [kbuild-all] " Chen, Rong A

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).