diff options
-rw-r--r-- | drivers/iommu/intel-iommu.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index c9c6053198d4..8aa580dc3033 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c | |||
@@ -48,8 +48,6 @@ | |||
48 | #define ROOT_SIZE VTD_PAGE_SIZE | 48 | #define ROOT_SIZE VTD_PAGE_SIZE |
49 | #define CONTEXT_SIZE VTD_PAGE_SIZE | 49 | #define CONTEXT_SIZE VTD_PAGE_SIZE |
50 | 50 | ||
51 | #define IS_BRIDGE_HOST_DEVICE(pdev) \ | ||
52 | ((pdev->class >> 8) == PCI_CLASS_BRIDGE_HOST) | ||
53 | #define IS_GFX_DEVICE(pdev) ((pdev->class >> 16) == PCI_BASE_CLASS_DISPLAY) | 51 | #define IS_GFX_DEVICE(pdev) ((pdev->class >> 16) == PCI_BASE_CLASS_DISPLAY) |
54 | #define IS_ISA_DEVICE(pdev) ((pdev->class >> 8) == PCI_CLASS_BRIDGE_ISA) | 52 | #define IS_ISA_DEVICE(pdev) ((pdev->class >> 8) == PCI_CLASS_BRIDGE_ISA) |
55 | #define IS_AZALIA(pdev) ((pdev)->vendor == 0x8086 && (pdev)->device == 0x3a3e) | 53 | #define IS_AZALIA(pdev) ((pdev)->vendor == 0x8086 && (pdev)->device == 0x3a3e) |
@@ -2369,18 +2367,18 @@ static int __init iommu_prepare_static_identity_mapping(int hw) | |||
2369 | return -EFAULT; | 2367 | return -EFAULT; |
2370 | 2368 | ||
2371 | for_each_pci_dev(pdev) { | 2369 | for_each_pci_dev(pdev) { |
2372 | /* Skip Host/PCI Bridge devices */ | ||
2373 | if (IS_BRIDGE_HOST_DEVICE(pdev)) | ||
2374 | continue; | ||
2375 | if (iommu_should_identity_map(pdev, 1)) { | 2370 | if (iommu_should_identity_map(pdev, 1)) { |
2376 | printk(KERN_INFO "IOMMU: %s identity mapping for device %s\n", | ||
2377 | hw ? "hardware" : "software", pci_name(pdev)); | ||
2378 | |||
2379 | ret = domain_add_dev_info(si_domain, pdev, | 2371 | ret = domain_add_dev_info(si_domain, pdev, |
2380 | hw ? CONTEXT_TT_PASS_THROUGH : | 2372 | hw ? CONTEXT_TT_PASS_THROUGH : |
2381 | CONTEXT_TT_MULTI_LEVEL); | 2373 | CONTEXT_TT_MULTI_LEVEL); |
2382 | if (ret) | 2374 | if (ret) { |
2375 | /* device not associated with an iommu */ | ||
2376 | if (ret == -ENODEV) | ||
2377 | continue; | ||
2383 | return ret; | 2378 | return ret; |
2379 | } | ||
2380 | pr_info("IOMMU: %s identity mapping for device %s\n", | ||
2381 | hw ? "hardware" : "software", pci_name(pdev)); | ||
2384 | } | 2382 | } |
2385 | } | 2383 | } |
2386 | 2384 | ||