diff options
Diffstat (limited to 'drivers/pci/intel-iommu.c')
-rw-r--r-- | drivers/pci/intel-iommu.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 796828fce34c..c9171be74564 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c | |||
@@ -340,7 +340,7 @@ int dmar_disabled = 0; | |||
340 | int dmar_disabled = 1; | 340 | int dmar_disabled = 1; |
341 | #endif /*CONFIG_DMAR_DEFAULT_ON*/ | 341 | #endif /*CONFIG_DMAR_DEFAULT_ON*/ |
342 | 342 | ||
343 | static int __initdata dmar_map_gfx = 1; | 343 | static int dmar_map_gfx = 1; |
344 | static int dmar_forcedac; | 344 | static int dmar_forcedac; |
345 | static int intel_iommu_strict; | 345 | static int intel_iommu_strict; |
346 | 346 | ||
@@ -1874,14 +1874,15 @@ static struct dmar_domain *get_domain_for_dev(struct pci_dev *pdev, int gaw) | |||
1874 | } | 1874 | } |
1875 | } | 1875 | } |
1876 | if (found) { | 1876 | if (found) { |
1877 | spin_unlock_irqrestore(&device_domain_lock, flags); | ||
1877 | free_devinfo_mem(info); | 1878 | free_devinfo_mem(info); |
1878 | domain_exit(domain); | 1879 | domain_exit(domain); |
1879 | domain = found; | 1880 | domain = found; |
1880 | } else { | 1881 | } else { |
1881 | list_add(&info->link, &domain->devices); | 1882 | list_add(&info->link, &domain->devices); |
1882 | list_add(&info->global, &device_domain_list); | 1883 | list_add(&info->global, &device_domain_list); |
1884 | spin_unlock_irqrestore(&device_domain_lock, flags); | ||
1883 | } | 1885 | } |
1884 | spin_unlock_irqrestore(&device_domain_lock, flags); | ||
1885 | } | 1886 | } |
1886 | 1887 | ||
1887 | found_domain: | 1888 | found_domain: |
@@ -3603,7 +3604,8 @@ static int intel_iommu_attach_device(struct iommu_domain *domain, | |||
3603 | pte = dmar_domain->pgd; | 3604 | pte = dmar_domain->pgd; |
3604 | if (dma_pte_present(pte)) { | 3605 | if (dma_pte_present(pte)) { |
3605 | free_pgtable_page(dmar_domain->pgd); | 3606 | free_pgtable_page(dmar_domain->pgd); |
3606 | dmar_domain->pgd = (struct dma_pte *)dma_pte_addr(pte); | 3607 | dmar_domain->pgd = (struct dma_pte *) |
3608 | phys_to_virt(dma_pte_addr(pte)); | ||
3607 | } | 3609 | } |
3608 | dmar_domain->agaw--; | 3610 | dmar_domain->agaw--; |
3609 | } | 3611 | } |
@@ -3719,6 +3721,12 @@ static void __devinit quirk_iommu_rwbf(struct pci_dev *dev) | |||
3719 | */ | 3721 | */ |
3720 | printk(KERN_INFO "DMAR: Forcing write-buffer flush capability\n"); | 3722 | printk(KERN_INFO "DMAR: Forcing write-buffer flush capability\n"); |
3721 | rwbf_quirk = 1; | 3723 | rwbf_quirk = 1; |
3724 | |||
3725 | /* https://bugzilla.redhat.com/show_bug.cgi?id=538163 */ | ||
3726 | if (dev->revision == 0x07) { | ||
3727 | printk(KERN_INFO "DMAR: Disabling IOMMU for graphics on this chipset\n"); | ||
3728 | dmar_map_gfx = 0; | ||
3729 | } | ||
3722 | } | 3730 | } |
3723 | 3731 | ||
3724 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2a40, quirk_iommu_rwbf); | 3732 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2a40, quirk_iommu_rwbf); |