]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iommufd/fault: Add an iommufd_fault_init() helper
authorNicolin Chen <nicolinc@nvidia.com>
Tue, 11 Mar 2025 19:44:20 +0000 (12:44 -0700)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 17 Mar 2025 17:51:19 +0000 (14:51 -0300)
commit927dabc9aa4dbebf92b34da9b7acd7d8d5c6331b
tree0eff7f0ab278903c89911dfcfb57eb46b9043e29
parentdbf00d7d89125802113a9d8ea4c77ab9f4de8866
iommufd/fault: Add an iommufd_fault_init() helper

The infrastructure of a fault object will be shared with a new vEVENTQ
object in a following change. Add an iommufd_fault_init helper and an
INIT_EVENTQ_FOPS marco for a vEVENTQ allocator to use too.

Reorder the iommufd_ctx_get and refcount_inc, to keep them symmetrical
with the iommufd_fault_fops_release().

Since the new vEVENTQ doesn't need "response" and its "mutex", so keep
the xa_init_flags and mutex_init in their original locations.

Link: https://patch.msgid.link/r/a9522c521909baeb1bd843950b2490478f3d06e0.1741719725.git.nicolinc@nvidia.com
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/iommu/iommufd/fault.c