tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 34e047aa16c0123bbae8e2f6df33e5ecc1f56601 commit: d991bb1c8da842a2a0b9dc83b1005e655783f861 include/linux/compiler-gcc.h: sparse can do constant folding of __builtin_bswap*() date: 11 months ago config: powerpc64-randconfig-s031-20220319 (https://download.01.org/0day-ci/archive/20220320/202203200152.tnHtopvO-lkp@xxxxxxxxx/config) compiler: powerpc64-linux-gcc (GCC) 11.2.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-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d991bb1c8da842a2a0b9dc83b1005e655783f861 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout d991bb1c8da842a2a0b9dc83b1005e655783f861 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=powerpc SHELL=/bin/bash arch/powerpc/kvm/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> sparse warnings: (new ones prefixed by >>) arch/powerpc/include/asm/kvm_ppc.h:977:1: sparse: expected unsigned int [usertype] int_pending arch/powerpc/include/asm/kvm_ppc.h:977:1: sparse: got restricted __le32 [usertype] arch/powerpc/include/asm/kvm_ppc.h:966:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] dar @@ got restricted __be64 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:966:1: sparse: expected unsigned long long [usertype] dar arch/powerpc/include/asm/kvm_ppc.h:966:1: sparse: got restricted __be64 [usertype] arch/powerpc/include/asm/kvm_ppc.h:966:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] dar @@ got restricted __le64 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:966:1: sparse: expected unsigned long long [usertype] dar arch/powerpc/include/asm/kvm_ppc.h:966:1: sparse: got restricted __le64 [usertype] arch/powerpc/include/asm/kvm_ppc.h:976:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] dsisr @@ got restricted __be32 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:976:1: sparse: expected unsigned int [usertype] dsisr arch/powerpc/include/asm/kvm_ppc.h:976:1: sparse: got restricted __be32 [usertype] arch/powerpc/include/asm/kvm_ppc.h:976:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] dsisr @@ got restricted __le32 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:976:1: sparse: expected unsigned int [usertype] dsisr arch/powerpc/include/asm/kvm_ppc.h:976:1: sparse: got restricted __le32 [usertype] arch/powerpc/include/asm/kvm_ppc.h:959:1: sparse: sparse: cast to restricted __be64 arch/powerpc/include/asm/kvm_ppc.h:959:1: sparse: sparse: cast to restricted __le64 arch/powerpc/include/asm/kvm_ppc.h:968:1: sparse: sparse: cast to restricted __be64 arch/powerpc/include/asm/kvm_ppc.h:968:1: sparse: sparse: cast to restricted __le64 arch/powerpc/include/asm/kvm_ppc.h:968:1: sparse: sparse: cast to restricted __be64 arch/powerpc/include/asm/kvm_ppc.h:968:1: sparse: sparse: cast to restricted __le64 arch/powerpc/include/asm/kvm_ppc.h:968:1: sparse: sparse: cast to restricted __be64 arch/powerpc/include/asm/kvm_ppc.h:968:1: sparse: sparse: cast to restricted __le64 arch/powerpc/include/asm/kvm_ppc.h:968:1: sparse: sparse: cast to restricted __be64 arch/powerpc/include/asm/kvm_ppc.h:968:1: sparse: sparse: cast to restricted __le64 arch/powerpc/include/asm/kvm_ppc.h:977:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] int_pending @@ got restricted __be32 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:977:1: sparse: expected unsigned int [usertype] int_pending arch/powerpc/include/asm/kvm_ppc.h:977:1: sparse: got restricted __be32 [usertype] arch/powerpc/include/asm/kvm_ppc.h:977:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] int_pending @@ got restricted __le32 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:977:1: sparse: expected unsigned int [usertype] int_pending arch/powerpc/include/asm/kvm_ppc.h:977:1: sparse: got restricted __le32 [usertype] arch/powerpc/include/asm/kvm_ppc.h:977:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] int_pending @@ got restricted __be32 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:977:1: sparse: expected unsigned int [usertype] int_pending arch/powerpc/include/asm/kvm_ppc.h:977:1: sparse: got restricted __be32 [usertype] arch/powerpc/include/asm/kvm_ppc.h:977:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] int_pending @@ got restricted __le32 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:977:1: sparse: expected unsigned int [usertype] int_pending arch/powerpc/include/asm/kvm_ppc.h:977:1: sparse: got restricted __le32 [usertype] arch/powerpc/include/asm/kvm_ppc.h:968:1: sparse: sparse: cast to restricted __be64 arch/powerpc/include/asm/kvm_ppc.h:968:1: sparse: sparse: cast to restricted __le64 arch/powerpc/include/asm/kvm_ppc.h:968:1: sparse: sparse: cast to restricted __be64 arch/powerpc/include/asm/kvm_ppc.h:968:1: sparse: sparse: cast to restricted __le64 arch/powerpc/include/asm/kvm_ppc.h:968:1: sparse: sparse: cast to restricted __be64 arch/powerpc/include/asm/kvm_ppc.h:968:1: sparse: sparse: cast to restricted __le64 arch/powerpc/include/asm/kvm_ppc.h:968:1: sparse: sparse: cast to restricted __be64 arch/powerpc/include/asm/kvm_ppc.h:968:1: sparse: sparse: cast to restricted __le64 arch/powerpc/include/asm/kvm_ppc.h:964:1: sparse: sparse: cast to restricted __be64 arch/powerpc/include/asm/kvm_ppc.h:964:1: sparse: sparse: cast to restricted __le64 arch/powerpc/include/asm/kvm_ppc.h:965:1: sparse: sparse: cast to restricted __be64 arch/powerpc/include/asm/kvm_ppc.h:965:1: sparse: sparse: cast to restricted __le64 arch/powerpc/include/asm/kvm_ppc.h:960:1: sparse: sparse: cast to restricted __be64 arch/powerpc/include/asm/kvm_ppc.h:960:1: sparse: sparse: cast to restricted __le64 arch/powerpc/include/asm/kvm_ppc.h:961:1: sparse: sparse: cast to restricted __be64 arch/powerpc/include/asm/kvm_ppc.h:961:1: sparse: sparse: cast to restricted __le64 arch/powerpc/include/asm/kvm_ppc.h:962:1: sparse: sparse: cast to restricted __be64 arch/powerpc/include/asm/kvm_ppc.h:962:1: sparse: sparse: cast to restricted __le64 arch/powerpc/include/asm/kvm_ppc.h:963:1: sparse: sparse: cast to restricted __be64 arch/powerpc/include/asm/kvm_ppc.h:963:1: sparse: sparse: cast to restricted __le64 arch/powerpc/include/asm/kvm_ppc.h:978:1: sparse: sparse: cast to restricted __be64 arch/powerpc/include/asm/kvm_ppc.h:978:1: sparse: sparse: cast to restricted __le64 arch/powerpc/include/asm/kvm_ppc.h:979:1: sparse: sparse: cast to restricted __be64 arch/powerpc/include/asm/kvm_ppc.h:979:1: sparse: sparse: cast to restricted __le64 arch/powerpc/include/asm/kvm_ppc.h:980:1: sparse: sparse: cast to restricted __be64 arch/powerpc/include/asm/kvm_ppc.h:980:1: sparse: sparse: cast to restricted __le64 arch/powerpc/include/asm/kvm_ppc.h:981:1: sparse: sparse: cast to restricted __be64 arch/powerpc/include/asm/kvm_ppc.h:981:1: sparse: sparse: cast to restricted __le64 arch/powerpc/include/asm/kvm_ppc.h:964:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] srr0 @@ got restricted __be64 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:964:1: sparse: expected unsigned long long [usertype] srr0 arch/powerpc/include/asm/kvm_ppc.h:964:1: sparse: got restricted __be64 [usertype] arch/powerpc/include/asm/kvm_ppc.h:964:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] srr0 @@ got restricted __le64 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:964:1: sparse: expected unsigned long long [usertype] srr0 arch/powerpc/include/asm/kvm_ppc.h:964:1: sparse: got restricted __le64 [usertype] arch/powerpc/include/asm/kvm_ppc.h:965:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] srr1 @@ got restricted __be64 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:965:1: sparse: expected unsigned long long [usertype] srr1 arch/powerpc/include/asm/kvm_ppc.h:965:1: sparse: got restricted __be64 [usertype] arch/powerpc/include/asm/kvm_ppc.h:965:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] srr1 @@ got restricted __le64 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:965:1: sparse: expected unsigned long long [usertype] srr1 arch/powerpc/include/asm/kvm_ppc.h:965:1: sparse: got restricted __le64 [usertype] arch/powerpc/include/asm/kvm_ppc.h:960:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] sprg0 @@ got restricted __be64 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:960:1: sparse: expected unsigned long long [usertype] sprg0 arch/powerpc/include/asm/kvm_ppc.h:960:1: sparse: got restricted __be64 [usertype] arch/powerpc/include/asm/kvm_ppc.h:960:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] sprg0 @@ got restricted __le64 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:960:1: sparse: expected unsigned long long [usertype] sprg0 arch/powerpc/include/asm/kvm_ppc.h:960:1: sparse: got restricted __le64 [usertype] arch/powerpc/include/asm/kvm_ppc.h:961:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] sprg1 @@ got restricted __be64 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:961:1: sparse: expected unsigned long long [usertype] sprg1 arch/powerpc/include/asm/kvm_ppc.h:961:1: sparse: got restricted __be64 [usertype] arch/powerpc/include/asm/kvm_ppc.h:961:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] sprg1 @@ got restricted __le64 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:961:1: sparse: expected unsigned long long [usertype] sprg1 arch/powerpc/include/asm/kvm_ppc.h:961:1: sparse: got restricted __le64 [usertype] arch/powerpc/include/asm/kvm_ppc.h:962:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] sprg2 @@ got restricted __be64 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:962:1: sparse: expected unsigned long long [usertype] sprg2 arch/powerpc/include/asm/kvm_ppc.h:962:1: sparse: got restricted __be64 [usertype] arch/powerpc/include/asm/kvm_ppc.h:962:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] sprg2 @@ got restricted __le64 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:962:1: sparse: expected unsigned long long [usertype] sprg2 arch/powerpc/include/asm/kvm_ppc.h:962:1: sparse: got restricted __le64 [usertype] arch/powerpc/include/asm/kvm_ppc.h:963:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] sprg3 @@ got restricted __be64 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:963:1: sparse: expected unsigned long long [usertype] sprg3 arch/powerpc/include/asm/kvm_ppc.h:963:1: sparse: got restricted __be64 [usertype] arch/powerpc/include/asm/kvm_ppc.h:963:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] sprg3 @@ got restricted __le64 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:963:1: sparse: expected unsigned long long [usertype] sprg3 arch/powerpc/include/asm/kvm_ppc.h:963:1: sparse: got restricted __le64 [usertype] >> arch/powerpc/include/asm/kvm_ppc.h:978:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] sprg4 @@ got restricted __be64 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:978:1: sparse: expected unsigned long long [usertype] sprg4 arch/powerpc/include/asm/kvm_ppc.h:978:1: sparse: got restricted __be64 [usertype] >> arch/powerpc/include/asm/kvm_ppc.h:978:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] sprg4 @@ got restricted __le64 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:978:1: sparse: expected unsigned long long [usertype] sprg4 arch/powerpc/include/asm/kvm_ppc.h:978:1: sparse: got restricted __le64 [usertype] >> arch/powerpc/include/asm/kvm_ppc.h:979:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] sprg5 @@ got restricted __be64 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:979:1: sparse: expected unsigned long long [usertype] sprg5 arch/powerpc/include/asm/kvm_ppc.h:979:1: sparse: got restricted __be64 [usertype] >> arch/powerpc/include/asm/kvm_ppc.h:979:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] sprg5 @@ got restricted __le64 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:979:1: sparse: expected unsigned long long [usertype] sprg5 arch/powerpc/include/asm/kvm_ppc.h:979:1: sparse: got restricted __le64 [usertype] >> arch/powerpc/include/asm/kvm_ppc.h:980:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] sprg6 @@ got restricted __be64 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:980:1: sparse: expected unsigned long long [usertype] sprg6 arch/powerpc/include/asm/kvm_ppc.h:980:1: sparse: got restricted __be64 [usertype] >> arch/powerpc/include/asm/kvm_ppc.h:980:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] sprg6 @@ got restricted __le64 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:980:1: sparse: expected unsigned long long [usertype] sprg6 arch/powerpc/include/asm/kvm_ppc.h:980:1: sparse: got restricted __le64 [usertype] >> arch/powerpc/include/asm/kvm_ppc.h:981:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] sprg7 @@ got restricted __be64 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:981:1: sparse: expected unsigned long long [usertype] sprg7 arch/powerpc/include/asm/kvm_ppc.h:981:1: sparse: got restricted __be64 [usertype] >> arch/powerpc/include/asm/kvm_ppc.h:981:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] sprg7 @@ got restricted __le64 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:981:1: sparse: expected unsigned long long [usertype] sprg7 arch/powerpc/include/asm/kvm_ppc.h:981:1: sparse: got restricted __le64 [usertype] arch/powerpc/include/asm/kvm_ppc.h:966:1: sparse: sparse: cast to restricted __be64 arch/powerpc/include/asm/kvm_ppc.h:966:1: sparse: sparse: cast to restricted __le64 arch/powerpc/include/asm/kvm_ppc.h:966:1: sparse: sparse: cast to restricted __be64 arch/powerpc/include/asm/kvm_ppc.h:966:1: sparse: sparse: cast to restricted __le64 arch/powerpc/include/asm/kvm_ppc.h:976:1: sparse: sparse: cast to restricted __be32 arch/powerpc/include/asm/kvm_ppc.h:976:1: sparse: sparse: cast to restricted __le32 arch/powerpc/include/asm/kvm_ppc.h:976:1: sparse: sparse: cast to restricted __be32 arch/powerpc/include/asm/kvm_ppc.h:976:1: sparse: sparse: cast to restricted __le32 arch/powerpc/include/asm/kvm_ppc.h:966:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] dar @@ got restricted __be64 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:966:1: sparse: expected unsigned long long [usertype] dar arch/powerpc/include/asm/kvm_ppc.h:966:1: sparse: got restricted __be64 [usertype] arch/powerpc/include/asm/kvm_ppc.h:966:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] dar @@ got restricted __le64 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:966:1: sparse: expected unsigned long long [usertype] dar arch/powerpc/include/asm/kvm_ppc.h:966:1: sparse: got restricted __le64 [usertype] arch/powerpc/include/asm/kvm_ppc.h:976:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] dsisr @@ got restricted __be32 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:976:1: sparse: expected unsigned int [usertype] dsisr arch/powerpc/include/asm/kvm_ppc.h:976:1: sparse: got restricted __be32 [usertype] arch/powerpc/include/asm/kvm_ppc.h:976:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] dsisr @@ got restricted __le32 [usertype] @@ arch/powerpc/include/asm/kvm_ppc.h:976:1: sparse: expected unsigned int [usertype] dsisr arch/powerpc/include/asm/kvm_ppc.h:976:1: sparse: got restricted __le32 [usertype] vim +978 arch/powerpc/include/asm/kvm_ppc.h 1dc0c5b88cae1c Bharat Bhushan 2014-07-17 958 5deb8e7ad8ac7e Alexander Graf 2014-04-24 959 SHARED_WRAPPER(critical, 64) 1dc0c5b88cae1c Bharat Bhushan 2014-07-17 960 SHARED_SPRNG_WRAPPER(sprg0, 64, SPRN_GSPRG0) 1dc0c5b88cae1c Bharat Bhushan 2014-07-17 961 SHARED_SPRNG_WRAPPER(sprg1, 64, SPRN_GSPRG1) 1dc0c5b88cae1c Bharat Bhushan 2014-07-17 962 SHARED_SPRNG_WRAPPER(sprg2, 64, SPRN_GSPRG2) 1dc0c5b88cae1c Bharat Bhushan 2014-07-17 963 SHARED_SPRNG_WRAPPER(sprg3, 64, SPRN_GSPRG3) 1dc0c5b88cae1c Bharat Bhushan 2014-07-17 964 SHARED_SPRNG_WRAPPER(srr0, 64, SPRN_GSRR0) 1dc0c5b88cae1c Bharat Bhushan 2014-07-17 965 SHARED_SPRNG_WRAPPER(srr1, 64, SPRN_GSRR1) 1dc0c5b88cae1c Bharat Bhushan 2014-07-17 966 SHARED_SPRNG_WRAPPER(dar, 64, SPRN_GDEAR) dc168549d9a0fb Bharat Bhushan 2014-07-17 967 SHARED_SPRNG_WRAPPER(esr, 64, SPRN_GESR) 5deb8e7ad8ac7e Alexander Graf 2014-04-24 968 SHARED_WRAPPER_GET(msr, 64) 5deb8e7ad8ac7e Alexander Graf 2014-04-24 969 static inline void kvmppc_set_msr_fast(struct kvm_vcpu *vcpu, u64 val) 5deb8e7ad8ac7e Alexander Graf 2014-04-24 970 { 5deb8e7ad8ac7e Alexander Graf 2014-04-24 971 if (kvmppc_shared_big_endian(vcpu)) 5deb8e7ad8ac7e Alexander Graf 2014-04-24 972 vcpu->arch.shared->msr = cpu_to_be64(val); 5deb8e7ad8ac7e Alexander Graf 2014-04-24 973 else 5deb8e7ad8ac7e Alexander Graf 2014-04-24 974 vcpu->arch.shared->msr = cpu_to_le64(val); 5deb8e7ad8ac7e Alexander Graf 2014-04-24 975 } 5deb8e7ad8ac7e Alexander Graf 2014-04-24 976 SHARED_WRAPPER(dsisr, 32) 5deb8e7ad8ac7e Alexander Graf 2014-04-24 977 SHARED_WRAPPER(int_pending, 32) 5deb8e7ad8ac7e Alexander Graf 2014-04-24 @978 SHARED_WRAPPER(sprg4, 64) 5deb8e7ad8ac7e Alexander Graf 2014-04-24 @979 SHARED_WRAPPER(sprg5, 64) 5deb8e7ad8ac7e Alexander Graf 2014-04-24 @980 SHARED_WRAPPER(sprg6, 64) 5deb8e7ad8ac7e Alexander Graf 2014-04-24 @981 SHARED_WRAPPER(sprg7, 64) 5deb8e7ad8ac7e Alexander Graf 2014-04-24 982 :::::: The code at line 978 was first introduced by commit :::::: 5deb8e7ad8ac7e3fcdfa042acff617f461b361c2 KVM: PPC: Make shared struct aka magic page guest endian :::::: TO: Alexander Graf <agraf@xxxxxxx> :::::: CC: Alexander Graf <agraf@xxxxxxx> -- 0-DAY CI Kernel Test Service https://01.org/lkp