[arm64:for-next/misc 13/14] ld.lld: error: undefined symbol: sve_get_vl

1 view
Skip to first unread message

kernel test robot

unread,
Apr 14, 2021, 7:14:19 PM4/14/21
to Mark Brown, kbuil...@lists.01.org, clang-bu...@googlegroups.com, linux-ar...@lists.infradead.org, Catalin Marinas
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/misc
head: 839157876f97fcc7ead0b62c9377bb50f75a3df9
commit: ef9c5d09797db874a29a97407c3ea3990210432b [13/14] arm64/sve: Remove redundant system_supports_sve() tests
config: arm64-randconfig-r036-20210414 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/commit/?id=ef9c5d09797db874a29a97407c3ea3990210432b
git remote add arm64 https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git
git fetch --no-tags arm64 for-next/misc
git checkout ef9c5d09797db874a29a97407c3ea3990210432b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64

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

All errors (new ones prefixed by >>):

>> ld.lld: error: undefined symbol: sve_get_vl
>>> referenced by fpsimd.c
>>> kernel/fpsimd.o:(fpsimd_save) in archive arch/arm64/built-in.a
--
>> ld.lld: error: undefined symbol: sve_save_state
>>> referenced by fpsimd.c
>>> kernel/fpsimd.o:(fpsimd_save) in archive arch/arm64/built-in.a
--
>> ld.lld: error: undefined symbol: sve_load_state
>>> referenced by fpsimd.c
>>> kernel/fpsimd.o:(task_fpsimd_load) in archive arch/arm64/built-in.a

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

Catalin Marinas

unread,
Apr 15, 2021, 8:41:27 AM4/15/21
to kernel test robot, Mark Brown, kbuil...@lists.01.org, clang-bu...@googlegroups.com, linux-ar...@lists.infradead.org
On Thu, Apr 15, 2021 at 07:13:41AM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/misc
> head: 839157876f97fcc7ead0b62c9377bb50f75a3df9
> commit: ef9c5d09797db874a29a97407c3ea3990210432b [13/14] arm64/sve: Remove redundant system_supports_sve() tests
> config: arm64-randconfig-r036-20210414 (attached as .config)
> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
> 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 arm64 cross compiling tool for clang build
> # apt-get install binutils-aarch64-linux-gnu
> # https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/commit/?id=ef9c5d09797db874a29a97407c3ea3990210432b
> git remote add arm64 https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git
> git fetch --no-tags arm64 for-next/misc
> git checkout ef9c5d09797db874a29a97407c3ea3990210432b
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <l...@intel.com>

Thanks for the report. That indeed triggers if CONFIG_ARM64_SVE is
disabled. Proposed fix:

diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c
index f6cd89131dc3..9d433854a662 100644
--- a/arch/arm64/kernel/fpsimd.c
+++ b/arch/arm64/kernel/fpsimd.c
@@ -285,7 +285,7 @@ static void task_fpsimd_load(void)
WARN_ON(!system_supports_fpsimd());
WARN_ON(!have_cpu_fpsimd_context());

- if (test_thread_flag(TIF_SVE))
+ if (IS_ENABLED(CONFIG_ARM64_SVE) && test_thread_flag(TIF_SVE))
sve_load_state(sve_pffr(&current->thread),
&current->thread.uw.fpsimd_state.fpsr,
sve_vq_from_vl(current->thread.sve_vl) - 1);
@@ -307,7 +307,7 @@ static void fpsimd_save(void)
WARN_ON(!have_cpu_fpsimd_context());

if (!test_thread_flag(TIF_FOREIGN_FPSTATE)) {
- if (test_thread_flag(TIF_SVE)) {
+ if (IS_ENABLED(CONFIG_ARM64_SVE) && test_thread_flag(TIF_SVE)) {
if (WARN_ON(sve_get_vl() != last->sve_vl)) {
/*
* Can't save the user regs, so current would

--
Catalin

Mark Brown

unread,
Apr 15, 2021, 8:49:47 AM4/15/21
to Catalin Marinas, kernel test robot, kbuil...@lists.01.org, clang-bu...@googlegroups.com, linux-ar...@lists.infradead.org
On Thu, Apr 15, 2021 at 01:41:22PM +0100, Catalin Marinas wrote:

> Thanks for the report. That indeed triggers if CONFIG_ARM64_SVE is
> disabled. Proposed fix:

Yes, I sent a patch that looks very similar earlier today.
signature.asc

Catalin Marinas

unread,
Apr 15, 2021, 8:52:56 AM4/15/21
to Mark Brown, kernel test robot, kbuil...@lists.01.org, clang-bu...@googlegroups.com, linux-ar...@lists.infradead.org
Ah, haven't got there yet. I'll apply yours. Thanks.

--
Catalin
Reply all
Reply to author
Forward
0 new messages