aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/amd_iommu.c
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2009-01-05 09:59:02 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-06 08:06:57 -0500
commit160c1d8e40866edfeae7d68816b7005d70acf391 (patch)
tree37dd78b2ea28a3953a46d401bd9657005eb444d7 /arch/x86/kernel/amd_iommu.c
parentf0402a262e1a4c03fc66b83659823bdcaac3c41a (diff)
x86, ia64: convert to use generic dma_map_ops struct
This converts X86 and IA64 to use include/linux/dma-mapping.h. It's a bit large but pretty boring. The major change for X86 is converting 'int dir' to 'enum dma_data_direction dir' in DMA mapping operations. The major changes for IA64 is using map_page and unmap_page instead of map_single and unmap_single. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/amd_iommu.c')
-rw-r--r--arch/x86/kernel/amd_iommu.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index a5dedb690a9a..008e522b9536 100644
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -1394,7 +1394,8 @@ static int map_sg_no_iommu(struct device *dev, struct scatterlist *sglist,
1394 * lists). 1394 * lists).
1395 */ 1395 */
1396static int map_sg(struct device *dev, struct scatterlist *sglist, 1396static int map_sg(struct device *dev, struct scatterlist *sglist,
1397 int nelems, int dir) 1397 int nelems, enum dma_data_direction dir,
1398 struct dma_attrs *attrs)
1398{ 1399{
1399 unsigned long flags; 1400 unsigned long flags;
1400 struct amd_iommu *iommu; 1401 struct amd_iommu *iommu;
@@ -1461,7 +1462,8 @@ unmap:
1461 * lists). 1462 * lists).
1462 */ 1463 */
1463static void unmap_sg(struct device *dev, struct scatterlist *sglist, 1464static void unmap_sg(struct device *dev, struct scatterlist *sglist,
1464 int nelems, int dir) 1465 int nelems, enum dma_data_direction dir,
1466 struct dma_attrs *attrs)
1465{ 1467{
1466 unsigned long flags; 1468 unsigned long flags;
1467 struct amd_iommu *iommu; 1469 struct amd_iommu *iommu;
@@ -1648,7 +1650,7 @@ static void prealloc_protection_domains(void)
1648 } 1650 }
1649} 1651}
1650 1652
1651static struct dma_mapping_ops amd_iommu_dma_ops = { 1653static struct dma_map_ops amd_iommu_dma_ops = {
1652 .alloc_coherent = alloc_coherent, 1654 .alloc_coherent = alloc_coherent,
1653 .free_coherent = free_coherent, 1655 .free_coherent = free_coherent,
1654 .map_page = map_page, 1656 .map_page = map_page,