aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
diff options
context:
space:
mode:
authorXu Yilun <[email protected]>2025-07-16 07:03:44 +0000
committerJason Gunthorpe <[email protected]>2025-07-18 20:33:08 +0000
commit7dc0e1090ba80bcf1bbb69b334ccb3c47631a9c5 (patch)
tree4985b2a9e63ee1f8e14d879a78d7e61d30973f90 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
parentiommufd: Add iommufd_object_tombstone_user() helper (diff)
downloadkernel-7dc0e1090ba80bcf1bbb69b334ccb3c47631a9c5.tar.gz
kernel-7dc0e1090ba80bcf1bbb69b334ccb3c47631a9c5.zip
iommufd: Add a pre_destroy() op for objects
Add a pre_destroy() op which gives objects a chance to clear their short term users references before destruction. This op is intended for external driver created objects (e.g. idev) which does deterministic destruction. In order to manage the lifecycle of interrelated objects as well as the deterministic destruction (e.g. vdev can't outlive idev, and idev destruction can't fail), short term users references are allowed to live out of an ioctl execution. An immediate use case is, vdev holds idev's short term user reference until vdev destruction completes, idev leverages existing wait_shortterm mechanism to ensure it is destroyed after vdev. This extended usage makes the referenced object unable to just wait for its reference gone. It needs to actively trigger the reference removal, as well as prevent new references before wait. Should implement these work in pre_destroy(). Link: https://patch.msgid.link/r/[email protected] Suggested-by: Jason Gunthorpe <[email protected]> Reviewed-by: Kevin Tian <[email protected]> Reviewed-by: Nicolin Chen <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Tested-by: Nicolin Chen <[email protected]> Signed-off-by: Xu Yilun <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
0 files changed, 0 insertions, 0 deletions