Intel IOMMU: Intel iommu cmdline option - forcedac

Introduce intel_iommu=forcedac commandline option.  This option is helpful to
verify the pci device capability of handling physical dma'able address greater
than 4G.

Signed-off-by: Anil S Keshavamurthy <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Muli Ben-Yehuda <[email protected]>
Cc: "Siddha, Suresh B" <[email protected]>
Cc: Arjan van de Ven <[email protected]>
Cc: Ashok Raj <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Greg KH <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Keshavamurthy, Anil S 2007-10-21 16:41:53 -07:00 • committed by Linus Torvalds
commit 7d3b03ce7b
2 changed files with 13 additions and 1 deletions

View file

@ -54,6 +54,7 @@ static void domain_remove_dev_info(struct dmar_domain *domain);
static int dmar_disabled;
static int __initdata dmar_map_gfx = 1;
static int dmar_forcedac;
#define DUMMY_DEVICE_DOMAIN_INFO ((struct device_domain_info *)(-1))
static DEFINE_SPINLOCK(device_domain_lock);
@ -71,6 +72,10 @@ static int __init intel_iommu_setup(char *str)
dmar_map_gfx = 0;
printk(KERN_INFO
"Intel-IOMMU: disable GFX device mapping\n");
} else if (!strncmp(str, "forcedac", 8)) {
printk (KERN_INFO
"Intel-IOMMU: Forcing DAC for PCI devices\n");
dmar_forcedac = 1;
}
str += strcspn(str, ",");
@ -1558,7 +1563,7 @@ static dma_addr_t __intel_map_single(struct device *dev, void *addr,
start_addr = IOVA_START_ADDR;
if (pdev->dma_mask <= DMA_32BIT_MASK) {
if ((pdev->dma_mask <= DMA_32BIT_MASK) || (dmar_forcedac)) {
iova = iommu_alloc_iova(domain, addr, size, start_addr,
pdev->dma_mask);
} else {