summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/pci-gart_64.c
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2009-01-05 23:47:28 +0900
committerIngo Molnar <mingo@elte.hu>2009-01-06 14:06:56 +0100
commitd7dff84053524186b139342ac66a4160ce6bb517 (patch)
tree504ba7cc335158fed360d32bec3baf834cafbbce /arch/x86/kernel/pci-gart_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-gart_64.c')
-rw-r--r--arch/x86/kernel/pci-gart_64.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c
index e49c6dd0e8c6..9c557c0c928c 100644
--- a/arch/x86/kernel/pci-gart_64.c
+++ b/arch/x86/kernel/pci-gart_64.c
@@ -275,13 +275,6 @@ static dma_addr_t gart_map_page(struct device *dev, struct page *page,
return bus;
}
-static dma_addr_t gart_map_single(struct device *dev, phys_addr_t paddr,
- size_t size, int dir)
-{
- return gart_map_page(dev, pfn_to_page(paddr >> PAGE_SHIFT),
- paddr & ~PAGE_MASK, size, dir, NULL);
-}
-
/*
* Free a DMA mapping.
*/
@@ -306,12 +299,6 @@ static void gart_unmap_page(struct device *dev, dma_addr_t dma_addr,
free_iommu(iommu_page, npages);
}
-static void gart_unmap_single(struct device *dev, dma_addr_t dma_addr,
- size_t size, int direction)
-{
- gart_unmap_page(dev, dma_addr, size, direction, NULL);
-}
-
/*
* Wrapper for pci_unmap_single working with scatterlists.
*/
@@ -324,7 +311,7 @@ gart_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, int dir)
for_each_sg(sg, s, nents, i) {
if (!s->dma_length || !s->length)
break;
- gart_unmap_single(dev, s->dma_address, s->dma_length, dir);
+ gart_unmap_page(dev, s->dma_address, s->dma_length, dir, NULL);
}
}
@@ -538,7 +525,7 @@ static void
gart_free_coherent(struct device *dev, size_t size, void *vaddr,
dma_addr_t dma_addr)
{
- gart_unmap_single(dev, dma_addr, size, DMA_BIDIRECTIONAL);
+ gart_unmap_page(dev, dma_addr, size, DMA_BIDIRECTIONAL, NULL);
free_pages((unsigned long)vaddr, get_order(size));
}
@@ -725,8 +712,6 @@ static __init int init_k8_gatt(struct agp_kern_info *info)
}
static struct dma_mapping_ops gart_dma_ops = {
- .map_single = gart_map_single,
- .unmap_single = gart_unmap_single,
.map_sg = gart_map_sg,
.unmap_sg = gart_unmap_sg,
.map_page = gart_map_page,