summaryrefslogtreecommitdiffstats
path: root/drivers/iommu
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2014-03-06 15:59:26 +0000
committerDavid Woodhouse <David.Woodhouse@intel.com>2014-03-24 14:06:33 +0000
commit3d89194a94da0c49f9d21720df6bbaf7c848449c (patch)
tree8f4ffa91b2c4ac35b217f5b6dede0f3746abe220 /drivers/iommu
parented40356b5fcf1ce28e026ab39c5b2b6939068b50 (diff)
downloadop-kernel-dev-3d89194a94da0c49f9d21720df6bbaf7c848449c.zip
op-kernel-dev-3d89194a94da0c49f9d21720df6bbaf7c848449c.tar.gz
iommu/vt-d: Make iommu_dummy() take struct device instead of struct pci_dev
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/intel-iommu.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index ace088e..2079cb6 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -2882,9 +2882,9 @@ static inline struct dmar_domain *get_valid_domain_for_dev(struct pci_dev *dev)
return __get_valid_domain_for_dev(dev);
}
-static int iommu_dummy(struct pci_dev *pdev)
+static int iommu_dummy(struct device *dev)
{
- return pdev->dev.archdata.iommu == DUMMY_DEVICE_DOMAIN_INFO;
+ return dev->archdata.iommu == DUMMY_DEVICE_DOMAIN_INFO;
}
/* Check if the pdev needs to go through non-identity map and unmap process.*/
@@ -2896,13 +2896,13 @@ static int iommu_no_mapping(struct device *dev)
if (unlikely(!dev_is_pci(dev)))
return 1;
- pdev = to_pci_dev(dev);
- if (iommu_dummy(pdev))
+ if (iommu_dummy(dev))
return 1;
if (!iommu_identity_mapping)
return 0;
+ pdev = to_pci_dev(dev);
found = identity_mapping(pdev);
if (found) {
if (iommu_should_identity_map(pdev, 0))
@@ -3801,7 +3801,7 @@ static int device_notifier(struct notifier_block *nb,
struct pci_dev *pdev = to_pci_dev(dev);
struct dmar_domain *domain;
- if (iommu_dummy(pdev))
+ if (iommu_dummy(dev))
return 0;
if (action != BUS_NOTIFY_UNBOUND_DRIVER &&
OpenPOWER on IntegriCloud