diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2009-01-05 09:47:28 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-06 08:06:56 -0500 |
commit | d7dff84053524186b139342ac66a4160ce6bb517 (patch) | |
tree | 504ba7cc335158fed360d32bec3baf834cafbbce /arch/x86/kernel/amd_iommu.c | |
parent | 33feffd4525fc2e4dd0a322fb5d07d61f85d791e (diff) |
x86: remove map_single and unmap_single in struct dma_mapping_ops
This patch converts dma_map_single and dma_unmap_single to use
map_page and unmap_page respectively and removes unnecessary
map_single and unmap_single in struct dma_mapping_ops.
This leaves intel-iommu's dma_map_single and dma_unmap_single since
IA64 uses them. They will be removed after the unification.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
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.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 85704418644a..a5dedb690a9a 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c | |||
@@ -1341,13 +1341,6 @@ out: | |||
1341 | return addr; | 1341 | return addr; |
1342 | } | 1342 | } |
1343 | 1343 | ||
1344 | static dma_addr_t map_single(struct device *dev, phys_addr_t paddr, | ||
1345 | size_t size, int dir) | ||
1346 | { | ||
1347 | return map_page(dev, pfn_to_page(paddr >> PAGE_SHIFT), | ||
1348 | paddr & ~PAGE_MASK, size, dir, NULL); | ||
1349 | } | ||
1350 | |||
1351 | /* | 1344 | /* |
1352 | * The exported unmap_single function for dma_ops. | 1345 | * The exported unmap_single function for dma_ops. |
1353 | */ | 1346 | */ |
@@ -1378,12 +1371,6 @@ static void unmap_page(struct device *dev, dma_addr_t dma_addr, size_t size, | |||
1378 | spin_unlock_irqrestore(&domain->lock, flags); | 1371 | spin_unlock_irqrestore(&domain->lock, flags); |
1379 | } | 1372 | } |
1380 | 1373 | ||
1381 | static void unmap_single(struct device *dev, dma_addr_t dma_addr, | ||
1382 | size_t size, int dir) | ||
1383 | { | ||
1384 | return unmap_page(dev, dma_addr, size, dir, NULL); | ||
1385 | } | ||
1386 | |||
1387 | /* | 1374 | /* |
1388 | * This is a special map_sg function which is used if we should map a | 1375 | * This is a special map_sg function which is used if we should map a |
1389 | * device which is not handled by an AMD IOMMU in the system. | 1376 | * device which is not handled by an AMD IOMMU in the system. |
@@ -1664,8 +1651,6 @@ static void prealloc_protection_domains(void) | |||
1664 | static struct dma_mapping_ops amd_iommu_dma_ops = { | 1651 | static struct dma_mapping_ops amd_iommu_dma_ops = { |
1665 | .alloc_coherent = alloc_coherent, | 1652 | .alloc_coherent = alloc_coherent, |
1666 | .free_coherent = free_coherent, | 1653 | .free_coherent = free_coherent, |
1667 | .map_single = map_single, | ||
1668 | .unmap_single = unmap_single, | ||
1669 | .map_page = map_page, | 1654 | .map_page = map_page, |
1670 | .unmap_page = unmap_page, | 1655 | .unmap_page = unmap_page, |
1671 | .map_sg = map_sg, | 1656 | .map_sg = map_sg, |