* arch/riscv/include/asm/jump_label.h:42:3: error: invalid operand for inline asm constraint 'i'
@ 2022-08-14 9:10 kernel test robot
2022-08-15 19:54 ` Nathan Chancellor
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2022-08-14 9:10 UTC (permalink / raw)
To: Dao Lu; +Cc: llvm, kbuild-all, linux-kernel, Palmer Dabbelt, Heiko Stuebner
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: aea23e7c464bfdec04b52cf61edb62030e9e0d0a
commit: 8eb060e10185cfc97ef0200d197ec246ba0f9f8c arch/riscv: add Zihintpause support
date: 3 days ago
config: riscv-randconfig-r005-20220814 (https://download.01.org/0day-ci/archive/20220814/202208141746.ABdEd5xo-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 3329cec2f79185bafd678f310fafadba2a8c76d2)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8eb060e10185cfc97ef0200d197ec246ba0f9f8c
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 8eb060e10185cfc97ef0200d197ec246ba0f9f8c
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv prepare
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <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:17:
In file included from include/vdso/processor.h:10:
In file included from arch/riscv/include/asm/vdso/processor.h:7:
In file included from include/linux/jump_label.h:112:
>> arch/riscv/include/asm/jump_label.h:42:3: error: invalid operand for inline asm constraint 'i'
" .option push \n\t"
^
1 error generated.
make[2]: *** [scripts/Makefile.build:249: arch/riscv/kernel/vdso/vgettimeofday.o] Error 1
make[2]: Target 'include/generated/vdso-offsets.h' not remade because of errors.
make[1]: *** [arch/riscv/Makefile:128: 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 +/i +42 arch/riscv/include/asm/jump_label.h
ebc00dde8a975a Emil Renner Berthing 2020-07-14 37
ebc00dde8a975a Emil Renner Berthing 2020-07-14 38 static __always_inline bool arch_static_branch_jump(struct static_key *key,
ebc00dde8a975a Emil Renner Berthing 2020-07-14 39 bool branch)
ebc00dde8a975a Emil Renner Berthing 2020-07-14 40 {
ebc00dde8a975a Emil Renner Berthing 2020-07-14 41 asm_volatile_goto(
ebc00dde8a975a Emil Renner Berthing 2020-07-14 @42 " .option push \n\t"
ebc00dde8a975a Emil Renner Berthing 2020-07-14 43 " .option norelax \n\t"
ebc00dde8a975a Emil Renner Berthing 2020-07-14 44 " .option norvc \n\t"
ebc00dde8a975a Emil Renner Berthing 2020-07-14 45 "1: jal zero, %l[label] \n\t"
ebc00dde8a975a Emil Renner Berthing 2020-07-14 46 " .option pop \n\t"
ebc00dde8a975a Emil Renner Berthing 2020-07-14 47 " .pushsection __jump_table, \"aw\" \n\t"
ebc00dde8a975a Emil Renner Berthing 2020-07-14 48 " .align " RISCV_LGPTR " \n\t"
ebc00dde8a975a Emil Renner Berthing 2020-07-14 49 " .long 1b - ., %l[label] - . \n\t"
ebc00dde8a975a Emil Renner Berthing 2020-07-14 50 " " RISCV_PTR " %0 - . \n\t"
ebc00dde8a975a Emil Renner Berthing 2020-07-14 51 " .popsection \n\t"
ebc00dde8a975a Emil Renner Berthing 2020-07-14 52 : : "i"(&((char *)key)[branch]) : : label);
ebc00dde8a975a Emil Renner Berthing 2020-07-14 53
ebc00dde8a975a Emil Renner Berthing 2020-07-14 54 return false;
ebc00dde8a975a Emil Renner Berthing 2020-07-14 55 label:
ebc00dde8a975a Emil Renner Berthing 2020-07-14 56 return true;
ebc00dde8a975a Emil Renner Berthing 2020-07-14 57 }
ebc00dde8a975a Emil Renner Berthing 2020-07-14 58
:::::: The code at line 42 was first introduced by commit
:::::: ebc00dde8a975a543f5e1a7cdac93fef89fefe58 riscv: Add jump-label implementation
:::::: TO: Emil Renner Berthing <kernel@esmil.dk>
:::::: CC: Palmer Dabbelt <palmerdabbelt@google.com>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: arch/riscv/include/asm/jump_label.h:42:3: error: invalid operand for inline asm constraint 'i'
2022-08-14 9:10 arch/riscv/include/asm/jump_label.h:42:3: error: invalid operand for inline asm constraint 'i' kernel test robot
@ 2022-08-15 19:54 ` Nathan Chancellor
0 siblings, 0 replies; 2+ messages in thread
From: Nathan Chancellor @ 2022-08-15 19:54 UTC (permalink / raw)
To: kernel test robot
Cc: Dao Lu, llvm, kbuild-all, linux-kernel, Palmer Dabbelt,
Heiko Stuebner
On Sun, Aug 14, 2022 at 05:10:53PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: aea23e7c464bfdec04b52cf61edb62030e9e0d0a
> commit: 8eb060e10185cfc97ef0200d197ec246ba0f9f8c arch/riscv: add Zihintpause support
> date: 3 days ago
> config: riscv-randconfig-r005-20220814 (https://download.01.org/0day-ci/archive/20220814/202208141746.ABdEd5xo-lkp@intel.com/config)
> compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 3329cec2f79185bafd678f310fafadba2a8c76d2)
> 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
> # install riscv cross compiling tool for clang build
> # apt-get install binutils-riscv64-linux-gnu
> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8eb060e10185cfc97ef0200d197ec246ba0f9f8c
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout 8eb060e10185cfc97ef0200d197ec246ba0f9f8c
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv prepare
>
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <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:17:
> In file included from include/vdso/processor.h:10:
> In file included from arch/riscv/include/asm/vdso/processor.h:7:
> In file included from include/linux/jump_label.h:112:
> >> arch/riscv/include/asm/jump_label.h:42:3: error: invalid operand for inline asm constraint 'i'
> " .option push \n\t"
> ^
> 1 error generated.
> make[2]: *** [scripts/Makefile.build:249: arch/riscv/kernel/vdso/vgettimeofday.o] Error 1
> make[2]: Target 'include/generated/vdso-offsets.h' not remade because of errors.
> make[1]: *** [arch/riscv/Makefile:128: 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.
Just for the record, GCC 12.1.0 fails in the same way with the same
configuration (I didn't look into the problem beyond that):
In file included from <command-line>:
In function 'arch_static_branch_jump',
inlined from 'cpu_relax' at arch/riscv/include/asm/vdso/processor.h:13:7:
include/linux/compiler_types.h:285:33: warning: 'asm' operand 0 probably does not match constraints
285 | #define asm_volatile_goto(x...) asm goto(x)
| ^~~
arch/riscv/include/asm/jump_label.h:41:9: note: in expansion of macro 'asm_volatile_goto'
41 | asm_volatile_goto(
| ^~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:285:33: error: impossible constraint in 'asm'
285 | #define asm_volatile_goto(x...) asm goto(x)
| ^~~
arch/riscv/include/asm/jump_label.h:41:9: note: in expansion of macro 'asm_volatile_goto'
41 | asm_volatile_goto(
| ^~~~~~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:249: arch/riscv/kernel/vdso/vgettimeofday.o] Error 1
Cheers,
Nathan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-15 19:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-14 9:10 arch/riscv/include/asm/jump_label.h:42:3: error: invalid operand for inline asm constraint 'i' kernel test robot
2022-08-15 19:54 ` Nathan Chancellor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox