]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/platforms/iseries/iommu.c
powerpc: Update remaining dma_mapping_ops to use map/unmap_page
[linux-2.6-omap-h63xx.git] / arch / powerpc / platforms / iseries / iommu.c
index bc818e4e203321b50557361ae2f5c4f2717cd4dc..bbe828f1b885d0fb072bbd12bad2ae7499d51297 100644 (file)
@@ -41,7 +41,7 @@
 #include <asm/iseries/hv_call_event.h>
 #include <asm/iseries/iommu.h>
 
-static void tce_build_iSeries(struct iommu_table *tbl, long index, long npages,
+static int tce_build_iSeries(struct iommu_table *tbl, long index, long npages,
                unsigned long uaddr, enum dma_data_direction direction,
                struct dma_attrs *attrs)
 {
@@ -71,6 +71,7 @@ static void tce_build_iSeries(struct iommu_table *tbl, long index, long npages,
                index++;
                uaddr += TCE_PAGE_SIZE;
        }
+       return 0;
 }
 
 static void tce_free_iSeries(struct iommu_table *tbl, long index, long npages)
@@ -214,14 +215,15 @@ EXPORT_SYMBOL_GPL(iseries_hv_free);
 dma_addr_t iseries_hv_map(void *vaddr, size_t size,
                        enum dma_data_direction direction)
 {
-       return iommu_map_single(NULL, &vio_iommu_table, vaddr, size,
-                               DMA_32BIT_MASK, direction, NULL);
+       return iommu_map_page(NULL, &vio_iommu_table, virt_to_page(vaddr),
+                             (unsigned long)vaddr % PAGE_SIZE, size,
+                             DMA_32BIT_MASK, direction, NULL);
 }
 
 void iseries_hv_unmap(dma_addr_t dma_handle, size_t size,
                        enum dma_data_direction direction)
 {
-       iommu_unmap_single(&vio_iommu_table, dma_handle, size, direction, NULL);
+       iommu_unmap_page(&vio_iommu_table, dma_handle, size, direction, NULL);
 }
 
 void __init iommu_vio_init(void)