[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202305071214.H6XgYvVI-lkp@intel.com>
Date: Sun, 7 May 2023 12:26:33 +0800
From: kernel test robot <lkp@...el.com>
To: Huacai Chen <chenhuacai@...ngson.cn>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: arch/loongarch/kernel/kfpu.c:17:9: sparse: sparse: incorrect type in
argument 1 (different address spaces)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fc4354c6e5c21257cf4a50b32f7c11c7d65c55b3
commit: 2b3bd32ea3a22ea2d5e591da4ac2c2b1fb17c0e0 LoongArch: Provide kernel fpu functions
date: 6 days ago
config: loongarch-randconfig-s043-20230507 (https://download.01.org/0day-ci/archive/20230507/202305071214.H6XgYvVI-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 12.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2b3bd32ea3a22ea2d5e591da4ac2c2b1fb17c0e0
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 2b3bd32ea3a22ea2d5e591da4ac2c2b1fb17c0e0
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=loongarch olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=loongarch SHELL=/bin/bash arch/loongarch/kernel/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202305071214.H6XgYvVI-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> arch/loongarch/kernel/kfpu.c:17:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got bool [noderef] __percpu * @@
arch/loongarch/kernel/kfpu.c:17:9: sparse: expected void *ptr
arch/loongarch/kernel/kfpu.c:17:9: sparse: got bool [noderef] __percpu *
>> arch/loongarch/kernel/kfpu.c:17:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got bool [noderef] __percpu * @@
arch/loongarch/kernel/kfpu.c:17:9: sparse: expected void *ptr
arch/loongarch/kernel/kfpu.c:17:9: sparse: got bool [noderef] __percpu *
>> arch/loongarch/kernel/kfpu.c:17:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got bool [noderef] __percpu * @@
arch/loongarch/kernel/kfpu.c:17:9: sparse: expected void *ptr
arch/loongarch/kernel/kfpu.c:17:9: sparse: got bool [noderef] __percpu *
>> arch/loongarch/kernel/kfpu.c:17:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got bool [noderef] __percpu * @@
arch/loongarch/kernel/kfpu.c:17:9: sparse: expected void *ptr
arch/loongarch/kernel/kfpu.c:17:9: sparse: got bool [noderef] __percpu *
arch/loongarch/kernel/kfpu.c:19:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got bool [noderef] __percpu * @@
arch/loongarch/kernel/kfpu.c:19:9: sparse: expected void *ptr
arch/loongarch/kernel/kfpu.c:19:9: sparse: got bool [noderef] __percpu *
arch/loongarch/kernel/kfpu.c:19:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got bool [noderef] __percpu * @@
arch/loongarch/kernel/kfpu.c:19:9: sparse: expected void *ptr
arch/loongarch/kernel/kfpu.c:19:9: sparse: got bool [noderef] __percpu *
arch/loongarch/kernel/kfpu.c:19:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got bool [noderef] __percpu * @@
arch/loongarch/kernel/kfpu.c:19:9: sparse: expected void *ptr
arch/loongarch/kernel/kfpu.c:19:9: sparse: got bool [noderef] __percpu *
arch/loongarch/kernel/kfpu.c:19:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got bool [noderef] __percpu * @@
arch/loongarch/kernel/kfpu.c:19:9: sparse: expected void *ptr
arch/loongarch/kernel/kfpu.c:19:9: sparse: got bool [noderef] __percpu *
arch/loongarch/kernel/kfpu.c:32:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got bool [noderef] __percpu * @@
arch/loongarch/kernel/kfpu.c:32:9: sparse: expected void *ptr
arch/loongarch/kernel/kfpu.c:32:9: sparse: got bool [noderef] __percpu *
arch/loongarch/kernel/kfpu.c:32:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got bool [noderef] __percpu * @@
arch/loongarch/kernel/kfpu.c:32:9: sparse: expected void *ptr
arch/loongarch/kernel/kfpu.c:32:9: sparse: got bool [noderef] __percpu *
arch/loongarch/kernel/kfpu.c:32:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got bool [noderef] __percpu * @@
arch/loongarch/kernel/kfpu.c:32:9: sparse: expected void *ptr
arch/loongarch/kernel/kfpu.c:32:9: sparse: got bool [noderef] __percpu *
arch/loongarch/kernel/kfpu.c:32:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got bool [noderef] __percpu * @@
arch/loongarch/kernel/kfpu.c:32:9: sparse: expected void *ptr
arch/loongarch/kernel/kfpu.c:32:9: sparse: got bool [noderef] __percpu *
arch/loongarch/kernel/kfpu.c:39:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got bool [noderef] __percpu * @@
arch/loongarch/kernel/kfpu.c:39:9: sparse: expected void *ptr
arch/loongarch/kernel/kfpu.c:39:9: sparse: got bool [noderef] __percpu *
arch/loongarch/kernel/kfpu.c:39:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got bool [noderef] __percpu * @@
arch/loongarch/kernel/kfpu.c:39:9: sparse: expected void *ptr
arch/loongarch/kernel/kfpu.c:39:9: sparse: got bool [noderef] __percpu *
arch/loongarch/kernel/kfpu.c:39:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got bool [noderef] __percpu * @@
arch/loongarch/kernel/kfpu.c:39:9: sparse: expected void *ptr
arch/loongarch/kernel/kfpu.c:39:9: sparse: got bool [noderef] __percpu *
arch/loongarch/kernel/kfpu.c:39:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got bool [noderef] __percpu * @@
arch/loongarch/kernel/kfpu.c:39:9: sparse: expected void *ptr
arch/loongarch/kernel/kfpu.c:39:9: sparse: got bool [noderef] __percpu *
arch/loongarch/kernel/kfpu.c: note: in included file (through arch/loongarch/include/asm/cpu-info.h, arch/loongarch/include/asm/processor.h, ...):
arch/loongarch/include/asm/loongarch.h:211:16: sparse: sparse: undefined identifier '__builtin_loongarch_csrrd_w'
arch/loongarch/include/asm/loongarch.h:211:16: sparse: sparse: cast from unknown type
arch/loongarch/include/asm/loongarch.h:221:9: sparse: sparse: undefined identifier '__builtin_loongarch_csrwr_w'
arch/loongarch/include/asm/loongarch.h:221:9: sparse: sparse: cast from unknown type
arch/loongarch/include/asm/loongarch.h:211:16: sparse: sparse: cast from unknown type
arch/loongarch/include/asm/loongarch.h:221:9: sparse: sparse: cast from unknown type
vim +17 arch/loongarch/kernel/kfpu.c
12
13 void kernel_fpu_begin(void)
14 {
15 preempt_disable();
16
> 17 WARN_ON(this_cpu_read(in_kernel_fpu));
18
19 this_cpu_write(in_kernel_fpu, true);
20
21 if (!is_fpu_owner())
22 enable_fpu();
23 else
24 _save_fp(¤t->thread.fpu);
25
26 write_fcsr(LOONGARCH_FCSR0, 0);
27 }
28 EXPORT_SYMBOL_GPL(kernel_fpu_begin);
29
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
Powered by blists - more mailing lists