diff options
| author | Chris Metcalf <cmetcalf@tilera.com> | 2010-07-06 13:45:24 -0400 |
|---|---|---|
| committer | Chris Metcalf <cmetcalf@tilera.com> | 2010-07-06 13:45:24 -0400 |
| commit | a2262d8a231e92742651859a10c9a4430a5e899a (patch) | |
| tree | b5a823e3f6a3f60e1dd995f113caf0b350228d84 /drivers/pci | |
| parent | ef06f55a5c936a395f3ee2e1237bbebdb4396c65 (diff) | |
| parent | 815c4163b6c8ebf8152f42b0a5fd015cfdcedc78 (diff) | |
Merge branch 'master' into for-linus
Diffstat (limited to 'drivers/pci')
| -rw-r--r-- | drivers/pci/intel-iommu.c | 14 | ||||
| -rw-r--r-- | drivers/pci/pci.c | 1 | ||||
| -rw-r--r-- | drivers/pci/pcie/pme/pcie_pme.c | 19 |
3 files changed, 25 insertions, 9 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); |
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 60f30e7f1c8c..740fb4ea9669 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
| @@ -2292,6 +2292,7 @@ void pci_msi_off(struct pci_dev *dev) | |||
| 2292 | pci_write_config_word(dev, pos + PCI_MSIX_FLAGS, control); | 2292 | pci_write_config_word(dev, pos + PCI_MSIX_FLAGS, control); |
| 2293 | } | 2293 | } |
| 2294 | } | 2294 | } |
| 2295 | EXPORT_SYMBOL_GPL(pci_msi_off); | ||
| 2295 | 2296 | ||
| 2296 | #ifndef HAVE_ARCH_PCI_SET_DMA_MAX_SEGMENT_SIZE | 2297 | #ifndef HAVE_ARCH_PCI_SET_DMA_MAX_SEGMENT_SIZE |
| 2297 | int pci_set_dma_max_seg_size(struct pci_dev *dev, unsigned int size) | 2298 | int pci_set_dma_max_seg_size(struct pci_dev *dev, unsigned int size) |
diff --git a/drivers/pci/pcie/pme/pcie_pme.c b/drivers/pci/pcie/pme/pcie_pme.c index aac285a16b62..d672a0a63816 100644 --- a/drivers/pci/pcie/pme/pcie_pme.c +++ b/drivers/pci/pcie/pme/pcie_pme.c | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | * being registered. Consequently, the interrupt-based PCIe PME signaling will | 34 | * being registered. Consequently, the interrupt-based PCIe PME signaling will |
| 35 | * not be used by any PCIe root ports in that case. | 35 | * not be used by any PCIe root ports in that case. |
| 36 | */ | 36 | */ |
| 37 | static bool pcie_pme_disabled; | 37 | static bool pcie_pme_disabled = true; |
| 38 | 38 | ||
| 39 | /* | 39 | /* |
| 40 | * The PCI Express Base Specification 2.0, Section 6.1.8, states the following: | 40 | * The PCI Express Base Specification 2.0, Section 6.1.8, states the following: |
| @@ -64,12 +64,19 @@ bool pcie_pme_msi_disabled; | |||
| 64 | 64 | ||
| 65 | static int __init pcie_pme_setup(char *str) | 65 | static int __init pcie_pme_setup(char *str) |
| 66 | { | 66 | { |
| 67 | if (!strcmp(str, "off")) | 67 | if (!strncmp(str, "auto", 4)) |
| 68 | pcie_pme_disabled = true; | 68 | pcie_pme_disabled = false; |
| 69 | else if (!strcmp(str, "force")) | 69 | else if (!strncmp(str, "force", 5)) |
| 70 | pcie_pme_force_enable = true; | 70 | pcie_pme_force_enable = true; |
| 71 | else if (!strcmp(str, "nomsi")) | 71 | |
| 72 | pcie_pme_msi_disabled = true; | 72 | str = strchr(str, ','); |
| 73 | if (str) { | ||
| 74 | str++; | ||
| 75 | str += strspn(str, " \t"); | ||
| 76 | if (*str && !strcmp(str, "nomsi")) | ||
| 77 | pcie_pme_msi_disabled = true; | ||
| 78 | } | ||
| 79 | |||
| 73 | return 1; | 80 | return 1; |
| 74 | } | 81 | } |
| 75 | __setup("pcie_pme=", pcie_pme_setup); | 82 | __setup("pcie_pme=", pcie_pme_setup); |
