aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/pci-calgary_64.c
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2009-01-05 09:47:28 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-06 08:06:56 -0500
commitd7dff84053524186b139342ac66a4160ce6bb517 (patch)
tree504ba7cc335158fed360d32bec3baf834cafbbce /arch/x86/kernel/pci-calgary_64.c
parent33feffd4525fc2e4dd0a322fb5d07d61f85d791e (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/pci-calgary_64.c')
-rw-r--r--arch/x86/kernel/pci-calgary_64.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c
index e33cfcf1af5b..756138b604e1 100644
--- a/arch/x86/kernel/pci-calgary_64.c
+++ b/arch/x86/kernel/pci-calgary_64.c
@@ -461,14 +461,6 @@ static dma_addr_t calgary_map_page(struct device *dev, struct page *page,
461 return iommu_alloc(dev, tbl, vaddr, npages, dir); 461 return iommu_alloc(dev, tbl, vaddr, npages, dir);
462} 462}
463 463
464static dma_addr_t calgary_map_single(struct device *dev, phys_addr_t paddr,
465 size_t size, int direction)
466{
467 return calgary_map_page(dev, pfn_to_page(paddr >> PAGE_SHIFT),
468 paddr & ~PAGE_MASK, size,
469 direction, NULL);
470}
471
472static void calgary_unmap_page(struct device *dev, dma_addr_t dma_addr, 464static void calgary_unmap_page(struct device *dev, dma_addr_t dma_addr,
473 size_t size, enum dma_data_direction dir, 465 size_t size, enum dma_data_direction dir,
474 struct dma_attrs *attrs) 466 struct dma_attrs *attrs)
@@ -480,12 +472,6 @@ static void calgary_unmap_page(struct device *dev, dma_addr_t dma_addr,
480 iommu_free(tbl, dma_addr, npages); 472 iommu_free(tbl, dma_addr, npages);
481} 473}
482 474
483static void calgary_unmap_single(struct device *dev, dma_addr_t dma_handle,
484 size_t size, int direction)
485{
486 calgary_unmap_page(dev, dma_handle, size, direction, NULL);
487}
488
489static void* calgary_alloc_coherent(struct device *dev, size_t size, 475static void* calgary_alloc_coherent(struct device *dev, size_t size,
490 dma_addr_t *dma_handle, gfp_t flag) 476 dma_addr_t *dma_handle, gfp_t flag)
491{ 477{
@@ -535,8 +521,6 @@ static void calgary_free_coherent(struct device *dev, size_t size,
535static struct dma_mapping_ops calgary_dma_ops = { 521static struct dma_mapping_ops calgary_dma_ops = {
536 .alloc_coherent = calgary_alloc_coherent, 522 .alloc_coherent = calgary_alloc_coherent,
537 .free_coherent = calgary_free_coherent, 523 .free_coherent = calgary_free_coherent,
538 .map_single = calgary_map_single,
539 .unmap_single = calgary_unmap_single,
540 .map_sg = calgary_map_sg, 524 .map_sg = calgary_map_sg,
541 .unmap_sg = calgary_unmap_sg, 525 .unmap_sg = calgary_unmap_sg,
542 .map_page = calgary_map_page, 526 .map_page = calgary_map_page,