aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/sn
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/sn
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/sn')
-rw-r--r--arch/ia64/sn/pci/pci_dma.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/ia64/sn/pci/pci_dma.c b/arch/ia64/sn/pci/pci_dma.c
index a9d310de57da..3290d6e00c31 100644
--- a/arch/ia64/sn/pci/pci_dma.c
+++ b/arch/ia64/sn/pci/pci_dma.c
@@ -76,7 +76,8 @@ EXPORT_SYMBOL(sn_dma_set_mask);
76 * more information. 76 * more information.
77 */ 77 */
78static void *sn_dma_alloc_coherent(struct device *dev, size_t size, 78static void *sn_dma_alloc_coherent(struct device *dev, size_t size,
79 dma_addr_t * dma_handle, gfp_t flags) 79 dma_addr_t * dma_handle, gfp_t flags,
80 struct dma_attrs *attrs)
80{ 81{
81 void *cpuaddr; 82 void *cpuaddr;
82 unsigned long phys_addr; 83 unsigned long phys_addr;
@@ -137,7 +138,7 @@ static void *sn_dma_alloc_coherent(struct device *dev, size_t size,
137 * any associated IOMMU mappings. 138 * any associated IOMMU mappings.
138 */ 139 */
139static void sn_dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, 140static void sn_dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
140 dma_addr_t dma_handle) 141 dma_addr_t dma_handle, struct dma_attrs *attrs)
141{ 142{
142 struct pci_dev *pdev = to_pci_dev(dev); 143 struct pci_dev *pdev = to_pci_dev(dev);
143 struct sn_pcibus_provider *provider = SN_PCIDEV_BUSPROVIDER(pdev); 144 struct sn_pcibus_provider *provider = SN_PCIDEV_BUSPROVIDER(pdev);
@@ -466,8 +467,8 @@ int sn_pci_legacy_write(struct pci_bus *bus, u16 port, u32 val, u8 size)
466} 467}
467 468
468static struct dma_map_ops sn_dma_ops = { 469static struct dma_map_ops sn_dma_ops = {
469 .alloc_coherent = sn_dma_alloc_coherent, 470 .alloc = sn_dma_alloc_coherent,
470 .free_coherent = sn_dma_free_coherent, 471 .free = sn_dma_free_coherent,
471 .map_page = sn_dma_map_page, 472 .map_page = sn_dma_map_page,
472 .unmap_page = sn_dma_unmap_page, 473 .unmap_page = sn_dma_unmap_page,
473 .map_sg = sn_dma_map_sg, 474 .map_sg = sn_dma_map_sg,