* [linux-next:master 7812/8516] drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4482:31: sparse: sparse: incompatible types in comparison expression (different address spaces):
@ 2021-08-17 21:43 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-08-17 21:43 UTC (permalink / raw)
To: Jack Zhang
Cc: kbuild-all, Linux Memory Management List, Alex Deucher,
Jingwen Chen, Andrey Grodzovsky
[-- Attachment #1: Type: text/plain, Size: 5423 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 9803fb968c8c2e1283f67b3baeb88e0adba435b4
commit: c530b02f39850a639b72d01ebbf7e5d745c60831 [7812/8516] drm/amd/amdgpu embed hw_fence into amdgpu_job
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-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.3-348-gf0e6938b-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c530b02f39850a639b72d01ebbf7e5d745c60831
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout c530b02f39850a639b72d01ebbf7e5d745c60831
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash drivers/gpu/drm/amd/amdgpu/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.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:312:49: sparse: sparse: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB"
drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:316:49: sparse: sparse: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB"
>> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4482:31: sparse: sparse: incompatible types in comparison expression (different address spaces):
>> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4482:31: sparse: struct dma_fence [noderef] __rcu *
>> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4482:31: sparse: struct dma_fence *
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4484:33: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4484:33: sparse: struct dma_fence [noderef] __rcu *
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4484:33: sparse: struct dma_fence *
vim +4482 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
4448
4449 int amdgpu_device_pre_asic_reset(struct amdgpu_device *adev,
4450 struct amdgpu_reset_context *reset_context)
4451 {
4452 int i, j, r = 0;
4453 struct amdgpu_job *job = NULL;
4454 bool need_full_reset =
4455 test_bit(AMDGPU_NEED_FULL_RESET, &reset_context->flags);
4456
4457 if (reset_context->reset_req_dev == adev)
4458 job = reset_context->job;
4459
4460 /* no need to dump if device is not in good state during probe period */
4461 if (!adev->gmc.xgmi.pending_reset)
4462 amdgpu_debugfs_wait_dump(adev);
4463
4464 if (amdgpu_sriov_vf(adev)) {
4465 /* stop the data exchange thread */
4466 amdgpu_virt_fini_data_exchange(adev);
4467 }
4468
4469 /* block all schedulers and reset given job's ring */
4470 for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
4471 struct amdgpu_ring *ring = adev->rings[i];
4472
4473 if (!ring || !ring->sched.thread)
4474 continue;
4475
4476 /*clear job fence from fence drv to avoid force_completion
4477 *leave NULL and vm flush fence in fence drv */
4478 for (j = 0; j <= ring->fence_drv.num_fences_mask; j++) {
4479 struct dma_fence *old, **ptr;
4480
4481 ptr = &ring->fence_drv.fences[j];
> 4482 old = rcu_dereference_protected(*ptr, 1);
4483 if (old && test_bit(AMDGPU_FENCE_FLAG_EMBED_IN_JOB_BIT, &old->flags)) {
4484 RCU_INIT_POINTER(*ptr, NULL);
4485 }
4486 }
4487 /* after all hw jobs are reset, hw fence is meaningless, so force_completion */
4488 amdgpu_fence_driver_force_completion(ring);
4489 }
4490
4491 if (job && job->vm)
4492 drm_sched_increase_karma(&job->base);
4493
4494 r = amdgpu_reset_prepare_hwcontext(adev, reset_context);
4495 /* If reset handler not implemented, continue; otherwise return */
4496 if (r == -ENOSYS)
4497 r = 0;
4498 else
4499 return r;
4500
4501 /* Don't suspend on bare metal if we are not going to HW reset the ASIC */
4502 if (!amdgpu_sriov_vf(adev)) {
4503
4504 if (!need_full_reset)
4505 need_full_reset = amdgpu_device_ip_need_full_reset(adev);
4506
4507 if (!need_full_reset) {
4508 amdgpu_device_ip_pre_soft_reset(adev);
4509 r = amdgpu_device_ip_soft_reset(adev);
4510 amdgpu_device_ip_post_soft_reset(adev);
4511 if (r || amdgpu_device_ip_check_soft_reset(adev)) {
4512 dev_info(adev->dev, "soft reset failed, will fallback to full reset!\n");
4513 need_full_reset = true;
4514 }
4515 }
4516
4517 if (need_full_reset)
4518 r = amdgpu_device_ip_suspend(adev);
4519 if (need_full_reset)
4520 set_bit(AMDGPU_NEED_FULL_RESET, &reset_context->flags);
4521 else
4522 clear_bit(AMDGPU_NEED_FULL_RESET,
4523 &reset_context->flags);
4524 }
4525
4526 return r;
4527 }
4528
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 70245 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* [linux-next:master 7812/8516] drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4482:31: sparse: sparse: incompatible types in comparison expression (different address spaces):
@ 2021-08-17 21:43 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-08-17 21:43 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 5544 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 9803fb968c8c2e1283f67b3baeb88e0adba435b4
commit: c530b02f39850a639b72d01ebbf7e5d745c60831 [7812/8516] drm/amd/amdgpu embed hw_fence into amdgpu_job
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-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.3-348-gf0e6938b-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c530b02f39850a639b72d01ebbf7e5d745c60831
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout c530b02f39850a639b72d01ebbf7e5d745c60831
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash drivers/gpu/drm/amd/amdgpu/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.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:312:49: sparse: sparse: static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB"
drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:316:49: sparse: sparse: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB"
>> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4482:31: sparse: sparse: incompatible types in comparison expression (different address spaces):
>> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4482:31: sparse: struct dma_fence [noderef] __rcu *
>> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4482:31: sparse: struct dma_fence *
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4484:33: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4484:33: sparse: struct dma_fence [noderef] __rcu *
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4484:33: sparse: struct dma_fence *
vim +4482 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
4448
4449 int amdgpu_device_pre_asic_reset(struct amdgpu_device *adev,
4450 struct amdgpu_reset_context *reset_context)
4451 {
4452 int i, j, r = 0;
4453 struct amdgpu_job *job = NULL;
4454 bool need_full_reset =
4455 test_bit(AMDGPU_NEED_FULL_RESET, &reset_context->flags);
4456
4457 if (reset_context->reset_req_dev == adev)
4458 job = reset_context->job;
4459
4460 /* no need to dump if device is not in good state during probe period */
4461 if (!adev->gmc.xgmi.pending_reset)
4462 amdgpu_debugfs_wait_dump(adev);
4463
4464 if (amdgpu_sriov_vf(adev)) {
4465 /* stop the data exchange thread */
4466 amdgpu_virt_fini_data_exchange(adev);
4467 }
4468
4469 /* block all schedulers and reset given job's ring */
4470 for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
4471 struct amdgpu_ring *ring = adev->rings[i];
4472
4473 if (!ring || !ring->sched.thread)
4474 continue;
4475
4476 /*clear job fence from fence drv to avoid force_completion
4477 *leave NULL and vm flush fence in fence drv */
4478 for (j = 0; j <= ring->fence_drv.num_fences_mask; j++) {
4479 struct dma_fence *old, **ptr;
4480
4481 ptr = &ring->fence_drv.fences[j];
> 4482 old = rcu_dereference_protected(*ptr, 1);
4483 if (old && test_bit(AMDGPU_FENCE_FLAG_EMBED_IN_JOB_BIT, &old->flags)) {
4484 RCU_INIT_POINTER(*ptr, NULL);
4485 }
4486 }
4487 /* after all hw jobs are reset, hw fence is meaningless, so force_completion */
4488 amdgpu_fence_driver_force_completion(ring);
4489 }
4490
4491 if (job && job->vm)
4492 drm_sched_increase_karma(&job->base);
4493
4494 r = amdgpu_reset_prepare_hwcontext(adev, reset_context);
4495 /* If reset handler not implemented, continue; otherwise return */
4496 if (r == -ENOSYS)
4497 r = 0;
4498 else
4499 return r;
4500
4501 /* Don't suspend on bare metal if we are not going to HW reset the ASIC */
4502 if (!amdgpu_sriov_vf(adev)) {
4503
4504 if (!need_full_reset)
4505 need_full_reset = amdgpu_device_ip_need_full_reset(adev);
4506
4507 if (!need_full_reset) {
4508 amdgpu_device_ip_pre_soft_reset(adev);
4509 r = amdgpu_device_ip_soft_reset(adev);
4510 amdgpu_device_ip_post_soft_reset(adev);
4511 if (r || amdgpu_device_ip_check_soft_reset(adev)) {
4512 dev_info(adev->dev, "soft reset failed, will fallback to full reset!\n");
4513 need_full_reset = true;
4514 }
4515 }
4516
4517 if (need_full_reset)
4518 r = amdgpu_device_ip_suspend(adev);
4519 if (need_full_reset)
4520 set_bit(AMDGPU_NEED_FULL_RESET, &reset_context->flags);
4521 else
4522 clear_bit(AMDGPU_NEED_FULL_RESET,
4523 &reset_context->flags);
4524 }
4525
4526 return r;
4527 }
4528
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 70245 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-17 21:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-17 21:43 [linux-next:master 7812/8516] drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4482:31: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel test robot
2021-08-17 21:43 ` kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.