aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/intel-iommu.c
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2009-07-04 05:40:38 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2009-07-04 05:40:44 -0400
commit1e4c64c46d413de84cc0b786bd6a9b555ba7d111 (patch)
tree5f7c9aa7801c59f88dacdcae3c6722c5d9149ebf /drivers/pci/intel-iommu.c
parent5a5e02a614e59db7536cd11029e6674adc41b191 (diff)
intel-iommu: Don't set identity mapping for bypassed graphics devices
We should check iommu_dummy() _first_, because that means it's attached to an iommu that we've just disabled completely. At the moment, we might try to put the device into the identity mapping domain. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/pci/intel-iommu.c')
-rw-r--r--drivers/pci/intel-iommu.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index ad85e95d2dcc..3e3910127fc1 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -2447,8 +2447,11 @@ static int iommu_no_mapping(struct pci_dev *pdev)
2447{ 2447{
2448 int found; 2448 int found;
2449 2449
2450 if (iommu_dummy(pdev))
2451 return 1;
2452
2450 if (!iommu_identity_mapping) 2453 if (!iommu_identity_mapping)
2451 return iommu_dummy(pdev); 2454 return 0;
2452 2455
2453 found = identity_mapping(pdev); 2456 found = identity_mapping(pdev);
2454 if (found) { 2457 if (found) {
@@ -2480,7 +2483,7 @@ static int iommu_no_mapping(struct pci_dev *pdev)
2480 } 2483 }
2481 } 2484 }
2482 2485
2483 return iommu_dummy(pdev); 2486 return 0;
2484} 2487}
2485 2488
2486static dma_addr_t __intel_map_single(struct device *hwdev, phys_addr_t paddr, 2489static dma_addr_t __intel_map_single(struct device *hwdev, phys_addr_t paddr,