diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2014-03-06 10:59:26 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2014-03-24 10:06:33 -0400 |
commit | 3d89194a94da0c49f9d21720df6bbaf7c848449c (patch) | |
tree | 8f4ffa91b2c4ac35b217f5b6dede0f3746abe220 /drivers/iommu | |
parent | ed40356b5fcf1ce28e026ab39c5b2b6939068b50 (diff) |
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.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index ace088eebb45..2079cb65d478 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) | |||
2882 | return __get_valid_domain_for_dev(dev); | 2882 | return __get_valid_domain_for_dev(dev); |
2883 | } | 2883 | } |
2884 | 2884 | ||
2885 | static int iommu_dummy(struct pci_dev *pdev) | 2885 | static int iommu_dummy(struct device *dev) |
2886 | { | 2886 | { |
2887 | return pdev->dev.archdata.iommu == DUMMY_DEVICE_DOMAIN_INFO; | 2887 | return dev->archdata.iommu == DUMMY_DEVICE_DOMAIN_INFO; |
2888 | } | 2888 | } |
2889 | 2889 | ||
2890 | /* Check if the pdev needs to go through non-identity map and unmap process.*/ | 2890 | /* 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) | |||
2896 | if (unlikely(!dev_is_pci(dev))) | 2896 | if (unlikely(!dev_is_pci(dev))) |
2897 | return 1; | 2897 | return 1; |
2898 | 2898 | ||
2899 | pdev = to_pci_dev(dev); | 2899 | if (iommu_dummy(dev)) |
2900 | if (iommu_dummy(pdev)) | ||
2901 | return 1; | 2900 | return 1; |
2902 | 2901 | ||
2903 | if (!iommu_identity_mapping) | 2902 | if (!iommu_identity_mapping) |
2904 | return 0; | 2903 | return 0; |
2905 | 2904 | ||
2905 | pdev = to_pci_dev(dev); | ||
2906 | found = identity_mapping(pdev); | 2906 | found = identity_mapping(pdev); |
2907 | if (found) { | 2907 | if (found) { |
2908 | if (iommu_should_identity_map(pdev, 0)) | 2908 | if (iommu_should_identity_map(pdev, 0)) |
@@ -3801,7 +3801,7 @@ static int device_notifier(struct notifier_block *nb, | |||
3801 | struct pci_dev *pdev = to_pci_dev(dev); | 3801 | struct pci_dev *pdev = to_pci_dev(dev); |
3802 | struct dmar_domain *domain; | 3802 | struct dmar_domain *domain; |
3803 | 3803 | ||
3804 | if (iommu_dummy(pdev)) | 3804 | if (iommu_dummy(dev)) |
3805 | return 0; | 3805 | return 0; |
3806 | 3806 | ||
3807 | if (action != BUS_NOTIFY_UNBOUND_DRIVER && | 3807 | if (action != BUS_NOTIFY_UNBOUND_DRIVER && |