All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-kernel@vger.kernel.org, x86@kernel.org
Subject: [tip:WIP.x86/core 1/1] arch/riscv/include/asm/vdso/gettimeofday.h:24:43: error: meaningless 'inline' on asm outside function
Date: Wed, 19 Mar 2025 20:45:07 +0800	[thread overview]
Message-ID: <202503192004.mvMWNurt-lkp@intel.com> (raw)

Hi Ingo,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.x86/core
head:   9262ee6499954dd387e4507e03b84512ab100706
commit: 9262ee6499954dd387e4507e03b84512ab100706 [1/1] compiler/gcc: Make asm() templates asm __inline__() by default
config: riscv-randconfig-001-20250319 (https://download.01.org/0day-ci/archive/20250319/202503192004.mvMWNurt-lkp@intel.com/config)
compiler: clang version 20.1.0 (https://github.com/llvm/llvm-project 24a30daaa559829ad079f2ff7f73eb4e18095f88)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250319/202503192004.mvMWNurt-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/202503192004.mvMWNurt-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:164:
>> arch/riscv/include/asm/vdso/gettimeofday.h:24:43: error: meaningless 'inline' on asm outside function
      24 |         register struct __kernel_old_timeval *tv asm("a0") = _tv;
         |                                                  ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:25:31: error: meaningless 'inline' on asm outside function
      25 |         register struct timezone *tz asm("a1") = _tz;
         |                                      ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:26:20: error: meaningless 'inline' on asm outside function
      26 |         register long ret asm("a0");
         |                           ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:27:19: error: meaningless 'inline' on asm outside function
      27 |         register long nr asm("a7") = __NR_gettimeofday;
         |                          ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:40:27: error: meaningless 'inline' on asm outside function
      40 |         register clockid_t clkid asm("a0") = _clkid;
         |                                  ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:41:40: error: meaningless 'inline' on asm outside function
      41 |         register struct __kernel_timespec *ts asm("a1") = _ts;
         |                                               ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:42:20: error: meaningless 'inline' on asm outside function
      42 |         register long ret asm("a0");
         |                           ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:43:19: error: meaningless 'inline' on asm outside function
      43 |         register long nr asm("a7") = __NR_clock_gettime;
         |                          ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:56:27: error: meaningless 'inline' on asm outside function
      56 |         register clockid_t clkid asm("a0") = _clkid;
         |                                  ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:57:40: error: meaningless 'inline' on asm outside function
      57 |         register struct __kernel_timespec *ts asm("a1") = _ts;
         |                                               ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:58:20: error: meaningless 'inline' on asm outside function
      58 |         register long ret asm("a0");
         |                           ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:59:19: error: meaningless 'inline' on asm outside function
      59 |         register long nr asm("a7") = __NR_clock_getres;
         |                          ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   12 errors generated.
   make[3]: *** [scripts/Makefile.build:207: arch/riscv/kernel/vdso/vgettimeofday.o] Error 1 shuffle=889927436
   In file included from arch/riscv/kernel/vdso/hwprobe.c:8:
   In file included from include/vdso/datapage.h:164:
>> arch/riscv/include/asm/vdso/gettimeofday.h:24:43: error: meaningless 'inline' on asm outside function
      24 |         register struct __kernel_old_timeval *tv asm("a0") = _tv;
         |                                                  ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from arch/riscv/kernel/vdso/hwprobe.c:8:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:25:31: error: meaningless 'inline' on asm outside function
      25 |         register struct timezone *tz asm("a1") = _tz;
         |                                      ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from arch/riscv/kernel/vdso/hwprobe.c:8:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:26:20: error: meaningless 'inline' on asm outside function
      26 |         register long ret asm("a0");
         |                           ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from arch/riscv/kernel/vdso/hwprobe.c:8:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:27:19: error: meaningless 'inline' on asm outside function
      27 |         register long nr asm("a7") = __NR_gettimeofday;
         |                          ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from arch/riscv/kernel/vdso/hwprobe.c:8:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:40:27: error: meaningless 'inline' on asm outside function
      40 |         register clockid_t clkid asm("a0") = _clkid;
         |                                  ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from arch/riscv/kernel/vdso/hwprobe.c:8:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:41:40: error: meaningless 'inline' on asm outside function
      41 |         register struct __kernel_timespec *ts asm("a1") = _ts;
         |                                               ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from arch/riscv/kernel/vdso/hwprobe.c:8:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:42:20: error: meaningless 'inline' on asm outside function
      42 |         register long ret asm("a0");
         |                           ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from arch/riscv/kernel/vdso/hwprobe.c:8:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:43:19: error: meaningless 'inline' on asm outside function
      43 |         register long nr asm("a7") = __NR_clock_gettime;
         |                          ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from arch/riscv/kernel/vdso/hwprobe.c:8:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:56:27: error: meaningless 'inline' on asm outside function
      56 |         register clockid_t clkid asm("a0") = _clkid;
         |                                  ^
   include/linux/compiler_types.h:480:19: note: expanded from macro 'asm'
     480 | # define asm(...) asm_inline(__VA_ARGS__)
         |                   ^
   include/linux/compiler_types.h:479:29: note: expanded from macro 'asm_inline'
     479 | # define asm_inline __asm__ __inline
         |                             ^
   In file included from arch/riscv/kernel/vdso/hwprobe.c:8:
   In file included from include/vdso/datapage.h:164:
   arch/riscv/include/asm/vdso/gettimeofday.h:57:40: error: meaningless 'inline' on asm outside function
      57 |         register struct __kernel_timespec *ts asm("a1") = _ts;


vim +/inline +24 arch/riscv/include/asm/vdso/gettimeofday.h

ad5d1122b82fbd6 Vincent Chen 2020-06-09  19  
ad5d1122b82fbd6 Vincent Chen 2020-06-09  20  static __always_inline
ad5d1122b82fbd6 Vincent Chen 2020-06-09  21  int gettimeofday_fallback(struct __kernel_old_timeval *_tv,
ad5d1122b82fbd6 Vincent Chen 2020-06-09  22  			  struct timezone *_tz)
ad5d1122b82fbd6 Vincent Chen 2020-06-09  23  {
ad5d1122b82fbd6 Vincent Chen 2020-06-09 @24  	register struct __kernel_old_timeval *tv asm("a0") = _tv;
ad5d1122b82fbd6 Vincent Chen 2020-06-09  25  	register struct timezone *tz asm("a1") = _tz;
ad5d1122b82fbd6 Vincent Chen 2020-06-09  26  	register long ret asm("a0");
ad5d1122b82fbd6 Vincent Chen 2020-06-09  27  	register long nr asm("a7") = __NR_gettimeofday;
ad5d1122b82fbd6 Vincent Chen 2020-06-09  28  
ad5d1122b82fbd6 Vincent Chen 2020-06-09  29  	asm volatile ("ecall\n"
ad5d1122b82fbd6 Vincent Chen 2020-06-09  30  		      : "=r" (ret)
ad5d1122b82fbd6 Vincent Chen 2020-06-09  31  		      : "r"(tv), "r"(tz), "r"(nr)
ad5d1122b82fbd6 Vincent Chen 2020-06-09  32  		      : "memory");
ad5d1122b82fbd6 Vincent Chen 2020-06-09  33  
ad5d1122b82fbd6 Vincent Chen 2020-06-09  34  	return ret;
ad5d1122b82fbd6 Vincent Chen 2020-06-09  35  }
ad5d1122b82fbd6 Vincent Chen 2020-06-09  36  

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

:::::: TO: Vincent Chen <vincent.chen@sifive.com>
:::::: CC: Palmer Dabbelt <palmerdabbelt@google.com>

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

                 reply	other threads:[~2025-03-19 12:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202503192004.mvMWNurt-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mingo@kernel.org \
    --cc=oe-kbuild-all@lists.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.