summaryrefslogtreecommitdiff
path: root/drivers/iommu/intel/debugfs.c
diff options
context:
space:
mode:
authorLu Baolu <baolu.lu@linux.intel.com>2022-03-01 05:01:52 +0300
committerJoerg Roedel <jroedel@suse.de>2022-03-04 18:46:30 +0300
commit586081d3f6b13ec9dfdfdf3d7842a688b376fa5e (patch)
tree38d549ec56689c8f4b795daf69ed5d66ca6c46bb /drivers/iommu/intel/debugfs.c
parentee2653bbe89df777e222ec1aa015c2ed7ea06b6b (diff)
downloadlinux-586081d3f6b13ec9dfdfdf3d7842a688b376fa5e.tar.xz
iommu/vt-d: Remove DEFER_DEVICE_DOMAIN_INFO
Allocate and set the per-device iommu private data during iommu device probe. This makes the per-device iommu private data always available during iommu_probe_device() and iommu_release_device(). With this changed, the dummy DEFER_DEVICE_DOMAIN_INFO pointer could be removed. The wrappers for getting the private data and domain are also cleaned. Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/20220214025704.3184654-1-baolu.lu@linux.intel.com Link: https://lore.kernel.org/r/20220301020159.633356-6-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/intel/debugfs.c')
-rw-r--r--drivers/iommu/intel/debugfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iommu/intel/debugfs.c b/drivers/iommu/intel/debugfs.c
index db7a0ca73626..ed796eea4581 100644
--- a/drivers/iommu/intel/debugfs.c
+++ b/drivers/iommu/intel/debugfs.c
@@ -344,7 +344,8 @@ static void pgtable_walk_level(struct seq_file *m, struct dma_pte *pde,
static int show_device_domain_translation(struct device *dev, void *data)
{
- struct dmar_domain *domain = find_domain(dev);
+ struct device_domain_info *info = dev_iommu_priv_get(dev);
+ struct dmar_domain *domain = info->domain;
struct seq_file *m = data;
u64 path[6] = { 0 };