diff options
author | Andrzej Pietrasiewicz <andrzej.p@samsung.com> | 2012-03-27 08:28:18 -0400 |
---|---|---|
committer | Marek Szyprowski <m.szyprowski@samsung.com> | 2012-03-28 10:36:31 -0400 |
commit | baa676fcf8d555269bd0a5a2496782beee55824d (patch) | |
tree | b92ef75b5a1bf6ff38222fb5aaeb0c64b2c88dc9 /arch/x86/kernel/pci-calgary_64.c | |
parent | 613c4578d4079a14dbee76ef7e0c80f635522fe3 (diff) |
X86 & IA64: adapt for dma_map_ops changes
Adapt core x86 and IA64 architecture code for dma_map_ops changes: replace
alloc/free_coherent with generic alloc/free methods.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
[removed swiotlb related changes and replaced it with wrappers,
merged with IA64 patch to avoid inter-patch dependences in intel-iommu code]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/x86/kernel/pci-calgary_64.c')
-rw-r--r-- | arch/x86/kernel/pci-calgary_64.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c index 726494b58345..07b587c5a2d2 100644 --- a/arch/x86/kernel/pci-calgary_64.c +++ b/arch/x86/kernel/pci-calgary_64.c | |||
@@ -431,7 +431,7 @@ static void calgary_unmap_page(struct device *dev, dma_addr_t dma_addr, | |||
431 | } | 431 | } |
432 | 432 | ||
433 | static void* calgary_alloc_coherent(struct device *dev, size_t size, | 433 | static void* calgary_alloc_coherent(struct device *dev, size_t size, |
434 | dma_addr_t *dma_handle, gfp_t flag) | 434 | dma_addr_t *dma_handle, gfp_t flag, struct dma_attrs *attrs) |
435 | { | 435 | { |
436 | void *ret = NULL; | 436 | void *ret = NULL; |
437 | dma_addr_t mapping; | 437 | dma_addr_t mapping; |
@@ -464,7 +464,8 @@ error: | |||
464 | } | 464 | } |
465 | 465 | ||
466 | static void calgary_free_coherent(struct device *dev, size_t size, | 466 | static void calgary_free_coherent(struct device *dev, size_t size, |
467 | void *vaddr, dma_addr_t dma_handle) | 467 | void *vaddr, dma_addr_t dma_handle, |
468 | struct dma_attrs *attrs) | ||
468 | { | 469 | { |
469 | unsigned int npages; | 470 | unsigned int npages; |
470 | struct iommu_table *tbl = find_iommu_table(dev); | 471 | struct iommu_table *tbl = find_iommu_table(dev); |
@@ -477,8 +478,8 @@ static void calgary_free_coherent(struct device *dev, size_t size, | |||
477 | } | 478 | } |
478 | 479 | ||
479 | static struct dma_map_ops calgary_dma_ops = { | 480 | static struct dma_map_ops calgary_dma_ops = { |
480 | .alloc_coherent = calgary_alloc_coherent, | 481 | .alloc = calgary_alloc_coherent, |
481 | .free_coherent = calgary_free_coherent, | 482 | .free = calgary_free_coherent, |
482 | .map_sg = calgary_map_sg, | 483 | .map_sg = calgary_map_sg, |
483 | .unmap_sg = calgary_unmap_sg, | 484 | .unmap_sg = calgary_unmap_sg, |
484 | .map_page = calgary_map_page, | 485 | .map_page = calgary_map_page, |