mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* arch/loongarch/kernel/kfpu.c:17:9: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2023-05-05 20:49 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2023-05-05 20:49 UTC (permalink / raw)
  To: Huacai Chen; +Cc: oe-kbuild-all, linux-kernel

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   7163a2111f6c030ee39635ac3334bfa1a52a3dd3
commit: 2b3bd32ea3a22ea2d5e591da4ac2c2b1fb17c0e0 LoongArch: Provide kernel fpu functions
date:   4 days ago
config: loongarch-randconfig-s043-20230501 (https://download.01.org/0day-ci/archive/20230506/202305060451.grzli3Av-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@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202305060451.grzli3Av-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(&current->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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* arch/loongarch/kernel/kfpu.c:17:9: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2023-05-07  4:26 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2023-05-07  4:26 UTC (permalink / raw)
  To: Huacai Chen; +Cc: oe-kbuild-all, linux-kernel

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@intel.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(&current->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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-05-07  4:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-05 20:49 arch/loongarch/kernel/kfpu.c:17:9: sparse: sparse: incorrect type in argument 1 (different address spaces) kernel test robot
2023-05-07  4:26 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®