diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2015-06-05 17:50:21 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-06-05 17:50:21 +1000 |
commit | a68b079d181ec755c6f63c06d366df718b7b30e2 (patch) | |
tree | ce4fefb53b5e5299baca90b27f3d0720e9fbbcc3 | |
parent | cb5655bce1353f87bda0462631b9a081227a754f (diff) | |
parent | 4ed6a540fab8ea4388c1703b73ecfed68a2009d1 (diff) | |
download | linux-next-a68b079d181ec755c6f63c06d366df718b7b30e2.tar.gz |
Merge remote-tracking branch 'dwmw2-iommu/master'
-rw-r--r-- | drivers/iommu/intel-iommu.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 60d5491efe6254..292690775b0ce9 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -805,6 +805,11 @@ static inline struct context_entry *iommu_context_addr(struct intel_iommu *iommu return &context[devfn]; } +static int iommu_dummy(struct device *dev) +{ + return dev->archdata.iommu == DUMMY_DEVICE_DOMAIN_INFO; +} + static struct intel_iommu *device_to_iommu(struct device *dev, u8 *bus, u8 *devfn) { struct dmar_drhd_unit *drhd = NULL; @@ -814,6 +819,9 @@ static struct intel_iommu *device_to_iommu(struct device *dev, u8 *bus, u8 *devf u16 segment = 0; int i; + if (iommu_dummy(dev)) + return NULL; + if (dev_is_pci(dev)) { pdev = to_pci_dev(dev); segment = pci_domain_nr(pdev->bus); @@ -3169,11 +3177,6 @@ static inline struct dmar_domain *get_valid_domain_for_dev(struct device *dev) return __get_valid_domain_for_dev(dev); } -static int iommu_dummy(struct device *dev) -{ - return dev->archdata.iommu == DUMMY_DEVICE_DOMAIN_INFO; -} - /* Check if the dev needs to go through non-identity map and unmap process.*/ static int iommu_no_mapping(struct device *dev) { |