linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [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):
@ 2023-12-05 14:38 kernel test robot
  2023-12-05 22:13 ` Felix Kuehling
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2023-12-05 14:38 UTC (permalink / raw)
  To: Felix Kuehling; +Cc: oe-kbuild-all, Linux Memory Management List, Alex Deucher

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@intel.com/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@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312052245.yFpBSgNH-lkp@intel.com/

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"
>> 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	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


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

* 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):
  2023-12-05 14:38 [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): kernel test robot
@ 2023-12-05 22:13 ` Felix Kuehling
  0 siblings, 0 replies; 2+ messages in thread
From: Felix Kuehling @ 2023-12-05 22:13 UTC (permalink / raw)
  To: kernel test robot
  Cc: oe-kbuild-all, Linux Memory Management List, Alex Deucher

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@intel.com/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@intel.com/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@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202312052245.yFpBSgNH-lkp@intel.com/
>
> 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	
>


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

end of thread, other threads:[~2023-12-05 22:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-05 14:38 [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): kernel test robot
2023-12-05 22:13 ` Felix Kuehling

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