It is "preferred_mem_loc" instead of "atomic" for the ATTR_PREFERRED_LOC
path.
Also include 2 minor changes with no functional impact.
1. Remove the redundant "attr.atomic_access" assignment.
2. Replace down_read_interruptible() with
xe_svm_notifier_lock_interruptible() to pair with
xe_svm_notifier_unlock().
Fixes: ada7486c5668 ("drm/xe: Implement madvise ioctl for xe")
Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Link: https://lore.kernel.org/r/20250911173139.1405878-2-shuicheng.lin@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
vmas[i]->attr.atomic_access = op->atomic.val;
}
- vmas[i]->attr.atomic_access = op->atomic.val;
-
bo = xe_vma_bo(vmas[i]);
if (!bo || bo->attr.atomic_access == op->atomic.val)
continue;
if (XE_IOCTL_DBG(xe, args->preferred_mem_loc.pad))
return false;
- if (XE_IOCTL_DBG(xe, args->atomic.reserved))
+ if (XE_IOCTL_DBG(xe, args->preferred_mem_loc.reserved))
return false;
break;
}
}
if (madvise_range.has_svm_userptr_vmas) {
- err = down_read_interruptible(&vm->svm.gpusvm.notifier_lock);
+ err = xe_svm_notifier_lock_interruptible(vm);
if (err)
goto err_fini;
}