aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/pci-swiotlb.c
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>2012-03-27 08:28:18 -0400
committerMarek Szyprowski <m.szyprowski@samsung.com>2012-03-28 10:36:31 -0400
commitbaa676fcf8d555269bd0a5a2496782beee55824d (patch)
treeb92ef75b5a1bf6ff38222fb5aaeb0c64b2c88dc9 /arch/ia64/kernel/pci-swiotlb.c
parent613c4578d4079a14dbee76ef7e0c80f635522fe3 (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/ia64/kernel/pci-swiotlb.c')
-rw-r--r--arch/ia64/kernel/pci-swiotlb.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/ia64/kernel/pci-swiotlb.c b/arch/ia64/kernel/pci-swiotlb.c
index d9485d952ed0..939260aeac98 100644
--- a/arch/ia64/kernel/pci-swiotlb.c
+++ b/arch/ia64/kernel/pci-swiotlb.c
@@ -15,16 +15,24 @@ int swiotlb __read_mostly;
15EXPORT_SYMBOL(swiotlb); 15EXPORT_SYMBOL(swiotlb);
16 16
17static void *ia64_swiotlb_alloc_coherent(struct device *dev, size_t size, 17static void *ia64_swiotlb_alloc_coherent(struct device *dev, size_t size,
18 dma_addr_t *dma_handle, gfp_t gfp) 18 dma_addr_t *dma_handle, gfp_t gfp,
19 struct dma_attrs *attrs)
19{ 20{
20 if (dev->coherent_dma_mask != DMA_BIT_MASK(64)) 21 if (dev->coherent_dma_mask != DMA_BIT_MASK(64))
21 gfp |= GFP_DMA; 22 gfp |= GFP_DMA;
22 return swiotlb_alloc_coherent(dev, size, dma_handle, gfp); 23 return swiotlb_alloc_coherent(dev, size, dma_handle, gfp);
23} 24}
24 25
26static void ia64_swiotlb_free_coherent(struct device *dev, size_t size,
27 void *vaddr, dma_addr_t dma_addr,
28 struct dma_attrs *attrs)
29{
30 swiotlb_free_coherent(dev, size, vaddr, dma_addr);
31}
32
25struct dma_map_ops swiotlb_dma_ops = { 33struct dma_map_ops swiotlb_dma_ops = {
26 .alloc_coherent = ia64_swiotlb_alloc_coherent, 34 .alloc = ia64_swiotlb_alloc_coherent,
27 .free_coherent = swiotlb_free_coherent, 35 .free = ia64_swiotlb_free_coherent,
28 .map_page = swiotlb_map_page, 36 .map_page = swiotlb_map_page,
29 .unmap_page = swiotlb_unmap_page, 37 .unmap_page = swiotlb_unmap_page,
30 .map_sg = swiotlb_map_sg_attrs, 38 .map_sg = swiotlb_map_sg_attrs,