[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1222107681-8185-9-git-send-email-joerg.roedel@amd.com>
Date: Mon, 22 Sep 2008 20:21:20 +0200
From: Joerg Roedel <joerg.roedel@....com>
To: linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
iommu@...ts.linux-foundation.org
CC: David Woodhouse <dwmw2@...radead.org>,
Muli Ben-Yehuda <muli@...ibm.com>,
Amit Shah <amit.shah@...ranet.com>,
Ingo Molnar <mingo@...hat.com>,
FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>,
Joerg Roedel <joerg.roedel@....com>
Subject: [PATCH 8/9] x86/iommu: change Intel IOMMU to use dma_ops register interface
Signed-off-by: Joerg Roedel <joerg.roedel@....com>
---
drivers/pci/intel-iommu.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index 6c4c1c3..283e65f 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -2255,6 +2255,12 @@ static int intel_map_sg(struct device *hwdev, struct scatterlist *sglist,
return nelems;
}
+static int intel_device_supported(struct device *dev)
+{
+ /* FIXME: is this correct? */
+ return dev && dev->bus == &pci_bus_type;
+}
+
static struct dma_mapping_ops intel_dma_ops = {
.alloc_coherent = intel_alloc_coherent,
.free_coherent = intel_free_coherent,
@@ -2262,6 +2268,7 @@ static struct dma_mapping_ops intel_dma_ops = {
.unmap_single = intel_unmap_single,
.map_sg = intel_map_sg,
.unmap_sg = intel_unmap_sg,
+ .device_supported = intel_device_supported,
};
static inline int iommu_domain_cache_init(void)
@@ -2449,6 +2456,7 @@ int __init intel_iommu_init(void)
init_timer(&unmap_timer);
force_iommu = 1;
+ x86_register_dma_ops(&intel_dma_ops, DMA_OPS_TYPE_HW);
dma_ops = &intel_dma_ops;
return 0;
}
--
1.5.6.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists