All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: Re: [PATCH v3 07/19] drm/xe/vm: Add a helper xe_vm_range_tilemask_tlb_invalidation()
Date: Fri, 30 May 2025 05:22:41 +0800	[thread overview]
Message-ID: <202505300542.iz30Sd3K-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20250527164003.1068118-8-himal.prasad.ghimiray@intel.com>
References: <20250527164003.1068118-8-himal.prasad.ghimiray@intel.com>
TO: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
TO: intel-xe@lists.freedesktop.org
CC: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
CC: Matthew Brost <matthew.brost@intel.com>

Hi Himal,

kernel test robot noticed the following build warnings:

[auto build test WARNING on drm-xe/drm-xe-next]
[also build test WARNING on linus/master v6.15 next-20250529]
[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/Himal-Prasad-Ghimiray/Introduce-drm_gpuvm_sm_map_ops_flags-enums-for-sm_map_ops/20250528-041919
base:   https://gitlab.freedesktop.org/drm/xe/kernel.git drm-xe-next
patch link:    https://lore.kernel.org/r/20250527164003.1068118-8-himal.prasad.ghimiray%40intel.com
patch subject: [PATCH v3 07/19] drm/xe/vm: Add a helper xe_vm_range_tilemask_tlb_invalidation()
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: loongarch-randconfig-r073-20250529 (https://download.01.org/0day-ci/archive/20250530/202505300542.iz30Sd3K-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 15.1.0

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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202505300542.iz30Sd3K-lkp@intel.com/

New smatch warnings:
drivers/gpu/drm/xe/xe_vm.c:3913 xe_vm_range_tilemask_tlb_invalidation() error: uninitialized symbol 'err'.

Old smatch warnings:
drivers/gpu/drm/xe/xe_vm.c:2480 new_vma() error: we previously assumed 'bo' could be null (see line 2454)
drivers/gpu/drm/xe/xe_vm.c:2492 new_vma() error: 'vma' dereferencing possible ERR_PTR()
drivers/gpu/drm/xe/xe_vm.c:2919 prefetch_ranges() warn: iterator 'i' not incremented
arch/loongarch/include/asm/atomic.h:135 arch_atomic_fetch_add_unless() warn: inconsistent indenting
drivers/gpu/drm/xe/xe_vm.c:4119 xe_vm_snapshot_print() warn: passing zero to 'PTR_ERR'

vim +/err +3913 drivers/gpu/drm/xe/xe_vm.c

dd08ebf6c3525a Matthew Brost         2023-03-30  3853  
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3854  /**
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3855   * xe_vm_range_tilemask_tlb_invalidation - Issue a TLB invalidation on this tilemask for an
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3856   * address range
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3857   * @vm: The VM
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3858   * @start: start address
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3859   * @end: end address
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3860   * @tile_mask: mask for which gt's issue tlb invalidation
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3861   *
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3862   * Issue a range based TLB invalidation for gt's in tilemask
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3863   *
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3864   * Returns 0 for success, negative error code otherwise.
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3865   */
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3866  int xe_vm_range_tilemask_tlb_invalidation(struct xe_vm *vm, u64 start,
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3867  					  u64 end, u8 tile_mask)
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3868  {
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3869  	struct xe_gt_tlb_invalidation_fence fence[XE_MAX_TILES_PER_DEVICE * XE_MAX_GT_PER_TILE];
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3870  	struct xe_tile *tile;
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3871  	u32 fence_id = 0;
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3872  	u8 id;
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3873  	int err;
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3874  
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3875  	if (!tile_mask)
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3876  		return 0;
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3877  
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3878  	for_each_tile(tile, vm->xe, id) {
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3879  		if (tile_mask & BIT(id)) {
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3880  			xe_gt_tlb_invalidation_fence_init(tile->primary_gt,
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3881  							  &fence[fence_id], true);
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3882  
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3883  			err = xe_gt_tlb_invalidation_range(tile->primary_gt,
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3884  							   &fence[fence_id],
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3885  							   start,
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3886  							   end,
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3887  							   vm->usm.asid);
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3888  			if (WARN_ON_ONCE(err < 0))
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3889  				goto wait;
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3890  			++fence_id;
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3891  
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3892  			if (!tile->media_gt)
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3893  				continue;
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3894  
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3895  			xe_gt_tlb_invalidation_fence_init(tile->media_gt,
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3896  							  &fence[fence_id], true);
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3897  
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3898  			err = xe_gt_tlb_invalidation_range(tile->media_gt,
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3899  							   &fence[fence_id],
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3900  							   start,
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3901  							   end,
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3902  							   vm->usm.asid);
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3903  			if (WARN_ON_ONCE(err < 0))
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3904  				goto wait;
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3905  			++fence_id;
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3906  		}
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3907  	}
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3908  
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3909  wait:
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3910  	for (id = 0; id < fence_id; ++id)
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3911  		xe_gt_tlb_invalidation_fence_wait(&fence[id]);
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3912  
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27 @3913  	return err;
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3914  }
511b2f09f331fc Himal Prasad Ghimiray 2025-05-27  3915  

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

             reply	other threads:[~2025-05-29 21:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-29 21:22 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-05-27 16:39 [PATCH v3 00/19] MADVISE FOR XE Himal Prasad Ghimiray
2025-05-27 16:39 ` [PATCH v3 07/19] drm/xe/vm: Add a helper xe_vm_range_tilemask_tlb_invalidation() Himal Prasad Ghimiray
2025-05-28 23:12   ` Matthew Brost
2025-05-29  3:21     ` Ghimiray, Himal Prasad

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=202505300542.iz30Sd3K-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@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.