aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/kernel-parameters.txt7
-rw-r--r--drivers/pci/intel-iommu.c7
2 files changed, 13 insertions, 1 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 8157417724a8..b2361667839f 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -781,6 +781,13 @@ and is between 256 and 4096 characters. It is defined in the file
781 bypassed by not enabling DMAR with this option. In 781 bypassed by not enabling DMAR with this option. In
782 this case, gfx device will use physical address for 782 this case, gfx device will use physical address for
783 DMA. 783 DMA.
784 forcedac [x86_64]
785 With this option iommu will not optimize to look
786 for io virtual address below 32 bit forcing dual
787 address cycle on pci bus for cards supporting greater
788 than 32 bit addressing. The default is to look
789 for translation below 32 bit and if not available
790 then look in the higher range.
784 791
785 io7= [HW] IO7 for Marvel based alpha systems 792 io7= [HW] IO7 for Marvel based alpha systems
786 See comment before marvel_specify_io7 in 793 See comment before marvel_specify_io7 in
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index 05630b44dbfc..cb24defdb6d9 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -54,6 +54,7 @@ static void domain_remove_dev_info(struct dmar_domain *domain);
54 54
55static int dmar_disabled; 55static int dmar_disabled;
56static int __initdata dmar_map_gfx = 1; 56static int __initdata dmar_map_gfx = 1;
57static int dmar_forcedac;
57 58
58#define DUMMY_DEVICE_DOMAIN_INFO ((struct device_domain_info *)(-1)) 59#define DUMMY_DEVICE_DOMAIN_INFO ((struct device_domain_info *)(-1))
59static DEFINE_SPINLOCK(device_domain_lock); 60static DEFINE_SPINLOCK(device_domain_lock);
@@ -71,6 +72,10 @@ static int __init intel_iommu_setup(char *str)
71 dmar_map_gfx = 0; 72 dmar_map_gfx = 0;
72 printk(KERN_INFO 73 printk(KERN_INFO
73 "Intel-IOMMU: disable GFX device mapping\n"); 74 "Intel-IOMMU: disable GFX device mapping\n");
75 } else if (!strncmp(str, "forcedac", 8)) {
76 printk (KERN_INFO
77 "Intel-IOMMU: Forcing DAC for PCI devices\n");
78 dmar_forcedac = 1;
74 } 79 }
75 80
76 str += strcspn(str, ","); 81 str += strcspn(str, ",");
@@ -1558,7 +1563,7 @@ static dma_addr_t __intel_map_single(struct device *dev, void *addr,
1558 1563
1559 start_addr = IOVA_START_ADDR; 1564 start_addr = IOVA_START_ADDR;
1560 1565
1561 if (pdev->dma_mask <= DMA_32BIT_MASK) { 1566 if ((pdev->dma_mask <= DMA_32BIT_MASK) || (dmar_forcedac)) {
1562 iova = iommu_alloc_iova(domain, addr, size, start_addr, 1567 iova = iommu_alloc_iova(domain, addr, size, start_addr,
1563 pdev->dma_mask); 1568 pdev->dma_mask);
1564 } else { 1569 } else {