]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iommufd/vdevice: Remove struct device reference from struct vdevice
authorXu Yilun <yilun.xu@linux.intel.com>
Wed, 16 Jul 2025 07:03:46 +0000 (15:03 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 18 Jul 2025 20:33:08 +0000 (17:33 -0300)
commit651f733675c4a26e59dd34522917eace20c557c0
tree1d5f5fbf461e6df98a78e54ceb390465918c979f
parent850f14f5b91986e586b66565c9c75bdd4c834571
iommufd/vdevice: Remove struct device reference from struct vdevice

Remove struct device *dev from struct vdevice.

The dev pointer is the Plan B for vdevice to reference the physical
device. As now vdev->idev is added without refcounting concern, just
use vdev->idev->dev when needed. To avoid exposing
struct iommufd_device in the public header, export a
iommufd_vdevice_to_device() helper.

Link: https://patch.msgid.link/r/20250716070349.1807226-6-yilun.xu@linux.intel.com
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>
Co-developed-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Xu Yilun <yilun.xu@linux.intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c
drivers/iommu/iommufd/driver.c
drivers/iommu/iommufd/viommu.c
include/linux/iommufd.h