[broonie-misc:arm64-sme-fixes 3/4] arch/arm64/kernel/fpsimd.c:1394:21: error: too many arguments to function call, expected single argument 'task', have 2 arguments
From: kernel test robot
Date: Thu Aug 11 2022 - 16:51:13 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git arm64-sme-fixes
head: faced24c84ad18ee30b91d041299519ce6190f28
commit: 6c9a05d1aa66fd95573944dc9bc0f7ce09785129 [3/4] arm64/sme: Don't flush SVE register state when allocating SME storage
config: arm64-randconfig-r026-20220811 (https://download.01.org/0day-ci/archive/20220812/202208120424.12sjZabd-lkp@xxxxxxxxx/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 5f1c7e2cc5a3c07cbc2412e851a7283c1841f520)
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/broonie/misc.git/commit/?id=6c9a05d1aa66fd95573944dc9bc0f7ce09785129
git remote add broonie-misc https://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git
git fetch --no-tags broonie-misc arm64-sme-fixes
git checkout 6c9a05d1aa66fd95573944dc9bc0f7ce09785129
# 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=arm64 SHELL=/bin/bash arch/arm64/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
>> arch/arm64/kernel/fpsimd.c:1394:21: error: too many arguments to function call, expected single argument 'task', have 2 arguments
sve_alloc(current, true);
~~~~~~~~~ ^~~~
arch/arm64/include/asm/fpsimd.h:259:20: note: 'sve_alloc' declared here
static inline void sve_alloc(struct task_struct *task) { }
^
arch/arm64/kernel/fpsimd.c:1445:21: error: too many arguments to function call, expected single argument 'task', have 2 arguments
sve_alloc(current, false);
~~~~~~~~~ ^~~~~
arch/arm64/include/asm/fpsimd.h:259:20: note: 'sve_alloc' declared here
static inline void sve_alloc(struct task_struct *task) { }
^
2 errors generated.
vim +/task +1394 arch/arm64/kernel/fpsimd.c
1374
1375 /*
1376 * Trapped SVE access
1377 *
1378 * Storage is allocated for the full SVE state, the current FPSIMD
1379 * register contents are migrated across, and the access trap is
1380 * disabled.
1381 *
1382 * TIF_SVE should be clear on entry: otherwise, fpsimd_restore_current_state()
1383 * would have disabled the SVE access trap for userspace during
1384 * ret_to_user, making an SVE access trap impossible in that case.
1385 */
1386 void do_sve_acc(unsigned long esr, struct pt_regs *regs)
1387 {
1388 /* Even if we chose not to use SVE, the hardware could still trap: */
1389 if (unlikely(!system_supports_sve()) || WARN_ON(is_compat_task())) {
1390 force_signal_inject(SIGILL, ILL_ILLOPC, regs->pc, 0);
1391 return;
1392 }
1393
> 1394 sve_alloc(current, true);
1395 if (!current->thread.sve_state) {
1396 force_sig(SIGKILL);
1397 return;
1398 }
1399
1400 get_cpu_fpsimd_context();
1401
1402 if (test_and_set_thread_flag(TIF_SVE))
1403 WARN_ON(1); /* SVE access shouldn't have trapped */
1404
1405 /*
1406 * Even if the task can have used streaming mode we can only
1407 * generate SVE access traps in normal SVE mode and
1408 * transitioning out of streaming mode may discard any
1409 * streaming mode state. Always clear the high bits to avoid
1410 * any potential errors tracking what is properly initialised.
1411 */
1412 sve_init_regs();
1413
1414 put_cpu_fpsimd_context();
1415 }
1416
--
0-DAY CI Kernel Test Service
https://01.org/lkp