Re: [linux-next:master 3341/4884] drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:2765:36: sparse: sparse: incompatible types in comparison expression (different address spaces):

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2023-12-05 09:38, kernel test robot wrote:
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   0f5f12ac05f36f117e793656c3f560625e927f1b
commit: 9a1c1339abf972477aeef4ea037e650f49c5892d [3341/4884] drm/amdkfd: Run restore_workers on freezable WQs
config: x86_64-randconfig-123-20231203 (https://download.01.org/0day-ci/archive/20231205/202312052245.yFpBSgNH-lkp@xxxxxxxxx/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231205/202312052245.yFpBSgNH-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312052245.yFpBSgNH-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
    drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_process.c: note: in included file (through drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_virt.h, drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h):
    drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:316:49: sparse: sparse: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB"
    drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:320:49: sparse: sparse: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB"

This is confusing. The assertion failures in amdgv_sriovmsg.h seem to be completely unrelated to the __rcu annotation problems that sparse pointing out below. I have a fix for the __rcu annotations that I'm about to send out, but I have no idea what to do about the sriov stuff.

Regards,
  Felix


drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_process.c:1671:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_process.c:1671:9: sparse:    struct dma_fence [noderef] __rcu *
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_process.c:1671:9: sparse:    struct dma_fence *
--
    drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c: note: in included file (through drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h, drivers/gpu/drm/amd/amdgpu/amdgpu.h, ...):
    drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:316:49: sparse: sparse: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB"
    drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:320:49: sparse: sparse: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB"
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:2765:36: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:2765:36: sparse:    struct dma_fence [noderef] __rcu *
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:2765:36: sparse:    struct dma_fence *
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:2765:36: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:2765:36: sparse:    struct dma_fence [noderef] __rcu *
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:2765:36: sparse:    struct dma_fence *
vim +2765 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c

   2761	
   2762	static void replace_eviction_fence(struct dma_fence **ef,
   2763					   struct dma_fence *new_ef)
   2764	{
2765		struct dma_fence *old_ef = rcu_replace_pointer(*ef, new_ef, true
   2766			/* protected by process_info->lock */);
   2767	
   2768		/* If we're replacing an unsignaled eviction fence, that fence will
   2769		 * never be signaled, and if anyone is still waiting on that fence,
   2770		 * they will hang forever. This should never happen. We should only
   2771		 * replace the fence in restore_work that only gets scheduled after
   2772		 * eviction work signaled the fence.
   2773		 */
   2774		WARN_ONCE(!dma_fence_is_signaled(old_ef),
   2775			  "Replacing unsignaled eviction fence");
   2776		dma_fence_put(old_ef);
   2777	}
   2778	





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux