All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Matthew Brost <matthew.brost@intel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [RFC PATCH v3 09/11] drm/xe: Drop BO dma-resv lock during SVM migrate-to-device
Date: Wed, 28 Jan 2026 19:46:50 +0800	[thread overview]
Message-ID: <202601281948.nDN28R3t-lkp@intel.com> (raw)
In-Reply-To: <20260128004841.2436896-10-matthew.brost@intel.com>

Hi Matthew,

[This is a private test report for your RFC patch.]
kernel test robot noticed the following build warnings:

[auto build test WARNING on drm-xe/drm-xe-next]
[also build test WARNING on drm/drm-next drm-tip/drm-tip next-20260127]
[cannot apply to drm-misc/drm-misc-next daeinki-drm-exynos/exynos-drm-next drm-i915/for-linux-next drm-i915/for-linux-next-fixes linus/master v6.19-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Matthew-Brost/drm-pagemap-Add-helper-to-access-zone_device_data/20260128-085843
base:   https://gitlab.freedesktop.org/drm/xe/kernel.git drm-xe-next
patch link:    https://lore.kernel.org/r/20260128004841.2436896-10-matthew.brost%40intel.com
patch subject: [RFC PATCH v3 09/11] drm/xe: Drop BO dma-resv lock during SVM migrate-to-device
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20260128/202601281948.nDN28R3t-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260128/202601281948.nDN28R3t-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/202601281948.nDN28R3t-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/xe/xe_svm.c:1048:2: warning: variable 'bo' is used uninitialized whenever '||' condition is false [-Wsometimes-uninitialized]
    1048 |         xe_validation_guard(&vctx, &xe->val, &exec, (struct xe_val_flags) {}, err) {
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/xe/xe_validation.h:189:2: note: expanded from macro 'xe_validation_guard'
     189 |         scoped_guard(xe_validation, _ctx, _val, _exec, _flags, &_ret) \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/cleanup.h:442:2: note: expanded from macro 'scoped_guard'
     442 |         __scoped_guard(_name, __UNIQUE_ID(label), args)
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/cleanup.h:434:7: note: expanded from macro '__scoped_guard'
     434 |              __guard_ptr(_name)(&scope) || !__is_cond_ptr(_name);       \
         |              ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/cleanup.h:416:28: note: expanded from macro '__guard_ptr'
     416 | #define __guard_ptr(_name) class_##_name##_lock_ptr
         |                            ^
   <scratch space>:25:1: note: expanded from here
      25 | class_xe_validation_lock_ptr
         | ^
   drivers/gpu/drm/xe/xe_svm.c:1090:39: note: uninitialized use occurs here
    1090 |         err = drm_pagemap_migrate_to_devmem(&bo->devmem_allocation, mm,
         |                                              ^~
   drivers/gpu/drm/xe/xe_svm.c:1048:2: note: remove the '||' if its condition is always true
    1048 |         xe_validation_guard(&vctx, &xe->val, &exec, (struct xe_val_flags) {}, err) {
         |         ^
   drivers/gpu/drm/xe/xe_validation.h:189:2: note: expanded from macro 'xe_validation_guard'
     189 |         scoped_guard(xe_validation, _ctx, _val, _exec, _flags, &_ret) \
         |         ^
   include/linux/cleanup.h:442:2: note: expanded from macro 'scoped_guard'
     442 |         __scoped_guard(_name, __UNIQUE_ID(label), args)
         |         ^
   include/linux/cleanup.h:434:7: note: expanded from macro '__scoped_guard'
     434 |              __guard_ptr(_name)(&scope) || !__is_cond_ptr(_name);       \
         |              ^
   include/linux/cleanup.h:416:28: note: expanded from macro '__guard_ptr'
     416 | #define __guard_ptr(_name) class_##_name##_lock_ptr
         |                            ^
   <scratch space>:25:1: note: expanded from here
      25 | class_xe_validation_lock_ptr
         | ^
   drivers/gpu/drm/xe/xe_svm.c:1040:18: note: initialize the variable 'bo' to silence this warning
    1040 |         struct xe_bo *bo;
         |                         ^
         |                          = NULL
   1 warning generated.


vim +1048 drivers/gpu/drm/xe/xe_svm.c

c904d4e2d73216 Himal Prasad Ghimiray 2025-05-13  1020  
f86ad0ed620cb3 Matthew Brost         2025-06-19  1021  #if IS_ENABLED(CONFIG_DRM_XE_PAGEMAP)
b5870168783168 Thomas Hellström      2025-06-19  1022  static int xe_drm_pagemap_populate_mm(struct drm_pagemap *dpagemap,
b5870168783168 Thomas Hellström      2025-06-19  1023  				      unsigned long start, unsigned long end,
b5870168783168 Thomas Hellström      2025-06-19  1024  				      struct mm_struct *mm,
b5870168783168 Thomas Hellström      2025-06-19  1025  				      unsigned long timeslice_ms)
2f118c949160d1 Matthew Brost         2025-03-05  1026  {
8a52f4d9b1efc9 Thomas Hellström      2025-12-19  1027  	struct xe_pagemap *xpagemap = container_of(dpagemap, typeof(*xpagemap), dpagemap);
75af93b3f5d0ab Thomas Hellström      2025-12-19  1028  	struct drm_pagemap_migrate_details mdetails = {
75af93b3f5d0ab Thomas Hellström      2025-12-19  1029  		.timeslice_ms = timeslice_ms,
75af93b3f5d0ab Thomas Hellström      2025-12-19  1030  		.source_peer_migrates = 1,
75af93b3f5d0ab Thomas Hellström      2025-12-19  1031  	};
8a52f4d9b1efc9 Thomas Hellström      2025-12-19  1032  	struct xe_vram_region *vr = xe_pagemap_to_vr(xpagemap);
16b5ad31952476 Thomas Hellström      2025-12-19  1033  	struct dma_fence *pre_migrate_fence = NULL;
4b0a5f5ce7849a Piotr Piórkowski      2025-07-14  1034  	struct xe_device *xe = vr->xe;
b5870168783168 Thomas Hellström      2025-06-19  1035  	struct device *dev = xe->drm.dev;
2f118c949160d1 Matthew Brost         2025-03-05  1036  	struct drm_buddy_block *block;
1710cd5c8c1bac Thomas Hellström      2025-09-08  1037  	struct xe_validation_ctx vctx;
2f118c949160d1 Matthew Brost         2025-03-05  1038  	struct list_head *blocks;
1710cd5c8c1bac Thomas Hellström      2025-09-08  1039  	struct drm_exec exec;
2f118c949160d1 Matthew Brost         2025-03-05  1040  	struct xe_bo *bo;
1710cd5c8c1bac Thomas Hellström      2025-09-08  1041  	int err = 0, idx;
f86ad0ed620cb3 Matthew Brost         2025-06-19  1042  
b5870168783168 Thomas Hellström      2025-06-19  1043  	if (!drm_dev_enter(&xe->drm, &idx))
b5870168783168 Thomas Hellström      2025-06-19  1044  		return -ENODEV;
d92eabb370ceb1 Matthew Brost         2025-03-05  1045  
b5870168783168 Thomas Hellström      2025-06-19  1046  	xe_pm_runtime_get(xe);
2f118c949160d1 Matthew Brost         2025-03-05  1047  
1710cd5c8c1bac Thomas Hellström      2025-09-08 @1048  	xe_validation_guard(&vctx, &xe->val, &exec, (struct xe_val_flags) {}, err) {
1710cd5c8c1bac Thomas Hellström      2025-09-08  1049  		bo = xe_bo_create_locked(xe, NULL, NULL, end - start,
2f118c949160d1 Matthew Brost         2025-03-05  1050  					 ttm_bo_type_device,
4b0a5f5ce7849a Piotr Piórkowski      2025-07-14  1051  					 (IS_DGFX(xe) ? XE_BO_FLAG_VRAM(vr) : XE_BO_FLAG_SYSTEM) |
1710cd5c8c1bac Thomas Hellström      2025-09-08  1052  					 XE_BO_FLAG_CPU_ADDR_MIRROR, &exec);
1710cd5c8c1bac Thomas Hellström      2025-09-08  1053  		drm_exec_retry_on_contention(&exec);
2f118c949160d1 Matthew Brost         2025-03-05  1054  		if (IS_ERR(bo)) {
2f118c949160d1 Matthew Brost         2025-03-05  1055  			err = PTR_ERR(bo);
1710cd5c8c1bac Thomas Hellström      2025-09-08  1056  			xe_validation_retry_on_oom(&vctx, &err);
1710cd5c8c1bac Thomas Hellström      2025-09-08  1057  			break;
2f118c949160d1 Matthew Brost         2025-03-05  1058  		}
2f118c949160d1 Matthew Brost         2025-03-05  1059  
16b5ad31952476 Thomas Hellström      2025-12-19  1060  		/* Ensure that any clearing or async eviction will complete before migration. */
16b5ad31952476 Thomas Hellström      2025-12-19  1061  		if (!dma_resv_test_signaled(bo->ttm.base.resv, DMA_RESV_USAGE_KERNEL)) {
16b5ad31952476 Thomas Hellström      2025-12-19  1062  			err = dma_resv_get_singleton(bo->ttm.base.resv, DMA_RESV_USAGE_KERNEL,
16b5ad31952476 Thomas Hellström      2025-12-19  1063  						     &pre_migrate_fence);
16b5ad31952476 Thomas Hellström      2025-12-19  1064  			if (err)
16b5ad31952476 Thomas Hellström      2025-12-19  1065  				dma_resv_wait_timeout(bo->ttm.base.resv, DMA_RESV_USAGE_KERNEL,
16b5ad31952476 Thomas Hellström      2025-12-19  1066  						      false, MAX_SCHEDULE_TIMEOUT);
16b5ad31952476 Thomas Hellström      2025-12-19  1067  			else if (pre_migrate_fence)
16b5ad31952476 Thomas Hellström      2025-12-19  1068  				dma_fence_enable_sw_signaling(pre_migrate_fence);
16b5ad31952476 Thomas Hellström      2025-12-19  1069  		}
16b5ad31952476 Thomas Hellström      2025-12-19  1070  
b5870168783168 Thomas Hellström      2025-06-19  1071  		drm_pagemap_devmem_init(&bo->devmem_allocation, dev, mm,
16b5ad31952476 Thomas Hellström      2025-12-19  1072  					&dpagemap_devmem_ops, dpagemap, end - start,
16b5ad31952476 Thomas Hellström      2025-12-19  1073  					pre_migrate_fence);
2f118c949160d1 Matthew Brost         2025-03-05  1074  
2f118c949160d1 Matthew Brost         2025-03-05  1075  		blocks = &to_xe_ttm_vram_mgr_resource(bo->ttm.resource)->blocks;
2f118c949160d1 Matthew Brost         2025-03-05  1076  		list_for_each_entry(block, blocks, link)
2f118c949160d1 Matthew Brost         2025-03-05  1077  			block->private = vr;
2f118c949160d1 Matthew Brost         2025-03-05  1078  
c9db07cab766b6 Thomas Hellström      2025-03-26  1079  		xe_bo_get(bo);
06ede36b0000e3 Matthew Brost         2026-01-27  1080  		/* Guard against eviction */
06ede36b0000e3 Matthew Brost         2026-01-27  1081  		ttm_bo_pin(&bo->ttm);
b5870168783168 Thomas Hellström      2025-06-19  1082  
b5870168783168 Thomas Hellström      2025-06-19  1083  		/* Ensure the device has a pm ref while there are device pages active. */
b5870168783168 Thomas Hellström      2025-06-19  1084  		xe_pm_runtime_get_noresume(xe);
06ede36b0000e3 Matthew Brost         2026-01-27  1085  		xe_bo_unlock(bo);
06ede36b0000e3 Matthew Brost         2026-01-27  1086  
06ede36b0000e3 Matthew Brost         2026-01-27  1087  	}
06ede36b0000e3 Matthew Brost         2026-01-27  1088  
75af93b3f5d0ab Thomas Hellström      2025-12-19  1089  	/* Consumes the devmem allocation ref. */
b5870168783168 Thomas Hellström      2025-06-19  1090  	err = drm_pagemap_migrate_to_devmem(&bo->devmem_allocation, mm,
75af93b3f5d0ab Thomas Hellström      2025-12-19  1091  					    start, end, &mdetails);
06ede36b0000e3 Matthew Brost         2026-01-27  1092  
06ede36b0000e3 Matthew Brost         2026-01-27  1093  	xe_bo_lock(bo, false);
06ede36b0000e3 Matthew Brost         2026-01-27  1094  	ttm_bo_unpin(&bo->ttm);
06ede36b0000e3 Matthew Brost         2026-01-27  1095  	ttm_bo_move_to_lru_tail_unlocked(&bo->ttm);
c9db07cab766b6 Thomas Hellström      2025-03-26  1096  	xe_bo_unlock(bo);
06ede36b0000e3 Matthew Brost         2026-01-27  1097  
c9db07cab766b6 Thomas Hellström      2025-03-26  1098  	xe_bo_put(bo);
06ede36b0000e3 Matthew Brost         2026-01-27  1099  
b5870168783168 Thomas Hellström      2025-06-19  1100  	xe_pm_runtime_put(xe);
b5870168783168 Thomas Hellström      2025-06-19  1101  	drm_dev_exit(idx);
2f118c949160d1 Matthew Brost         2025-03-05  1102  
2f118c949160d1 Matthew Brost         2025-03-05  1103  	return err;
2f118c949160d1 Matthew Brost         2025-03-05  1104  }
6c55404d4f7306 Thomas Hellström      2025-03-26  1105  #endif
6c55404d4f7306 Thomas Hellström      2025-03-26  1106  

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

  reply	other threads:[~2026-01-28 11:47 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-28  0:48 [RFC PATCH v3 00/11] Use new dma-map IOVA alloc, link, and sync API in GPU SVM and DRM pagemap Matthew Brost
2026-01-28  0:48 ` [RFC PATCH v3 01/11] drm/pagemap: Add helper to access zone_device_data Matthew Brost
2026-01-28 13:53   ` Leon Romanovsky
2026-01-28  0:48 ` [RFC PATCH v3 02/11] drm/gpusvm: Use dma-map IOVA alloc, link, and sync API in GPU SVM Matthew Brost
2026-01-28 11:24   ` kernel test robot
2026-01-28 14:04   ` Leon Romanovsky
2026-01-28  0:48 ` [RFC PATCH v3 03/11] drm/pagemap: Split drm_pagemap_migrate_map_pages into device / system Matthew Brost
2026-01-28  0:48 ` [RFC PATCH v3 04/11] drm/pagemap: Use dma-map IOVA alloc, link, and sync API for DRM pagemap Matthew Brost
2026-01-28 14:28   ` Leon Romanovsky
2026-01-28 17:46     ` Matthew Brost
2026-01-28 17:55       ` Jason Gunthorpe
2026-01-28 19:29         ` Matthew Brost
2026-01-28 19:38           ` Jason Gunthorpe
2026-01-28 19:45           ` Leon Romanovsky
2026-01-28 21:04             ` Matthew Brost
2026-01-29 10:14               ` Leon Romanovsky
2026-01-29 18:22                 ` Matthew Brost
2026-01-28  0:48 ` [RFC PATCH v3 05/11] drm/pagemap: Reduce number of IOVA link calls Matthew Brost
2026-01-28  0:48 ` [RFC PATCH v3 06/11] drm/pagemap: Add IOVA interface to DRM pagemap Matthew Brost
2026-01-28 15:14   ` Jason Gunthorpe
2026-01-28 18:42     ` Matthew Brost
2026-01-28 19:35       ` Jason Gunthorpe
2026-01-28 20:24         ` Matthew Brost
2026-01-29 18:57           ` Jason Gunthorpe
2026-01-29 19:28             ` Matthew Brost
2026-01-29 19:32               ` Jason Gunthorpe
2026-01-28 19:41       ` Matthew Brost
2026-01-28  0:48 ` [RFC PATCH v3 07/11] drm/xe: Stub out DRM pagemap IOVA alloc implementation Matthew Brost
2026-01-28  0:48 ` [RFC PATCH v3 08/11] drm/pagemap: Use device-to-device IOVA alloc, link, and sync API for DRM pagemap Matthew Brost
2026-01-28  0:48 ` [RFC PATCH v3 09/11] drm/xe: Drop BO dma-resv lock during SVM migrate-to-device Matthew Brost
2026-01-28 11:46   ` kernel test robot [this message]
2026-01-28  0:48 ` [RFC PATCH v3 10/11] drm/xe: Implement DRM pagemap IOVA vfuncs Matthew Brost
2026-01-28  0:48 ` [RFC PATCH v3 11/11] drm/gpusvm: Use device-to-device IOVA alloc, link, and sync API in GPU SVM Matthew Brost
2026-01-28  0:59 ` ✗ CI.checkpatch: warning for Use new dma-map IOVA alloc, link, and sync API in GPU SVM and DRM pagemap (rev3) Patchwork
2026-01-28  1:01 ` ✓ CI.KUnit: success " Patchwork
2026-01-28  1:42 ` ✓ Xe.CI.BAT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202601281948.nDN28R3t-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=matthew.brost@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.