Merge tag 'dma-mapping-5.4' of git://git.infradead.org/users/hch/dma-mapping
[linux-2.6-block.git] / drivers / xen / swiotlb-xen.c
index 1190934098eb24dc3e040fc8216ef68897f0cb1e..58c9365fa217654cb3863ff3cf05e0d6f565c6be 100644 (file)
@@ -387,8 +387,8 @@ static dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page,
         */
        trace_swiotlb_bounced(dev, dev_addr, size, swiotlb_force);
 
-       map = swiotlb_tbl_map_single(dev, start_dma_addr, phys, size, dir,
-                                    attrs);
+       map = swiotlb_tbl_map_single(dev, start_dma_addr, phys,
+                                    size, size, dir, attrs);
        if (map == (phys_addr_t)DMA_MAPPING_ERROR)
                return DMA_MAPPING_ERROR;
 
@@ -399,7 +399,7 @@ static dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page,
         * Ensure that the address returned is DMA'ble
         */
        if (unlikely(!dma_capable(dev, dev_addr, size))) {
-               swiotlb_tbl_unmap_single(dev, map, size, dir,
+               swiotlb_tbl_unmap_single(dev, map, size, size, dir,
                                attrs | DMA_ATTR_SKIP_CPU_SYNC);
                return DMA_MAPPING_ERROR;
        }
@@ -430,7 +430,7 @@ static void xen_swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr,
 
        /* NOTE: We use dev_addr here, not paddr! */
        if (is_xen_swiotlb_buffer(dev_addr))
-               swiotlb_tbl_unmap_single(hwdev, paddr, size, dir, attrs);
+               swiotlb_tbl_unmap_single(hwdev, paddr, size, size, dir, attrs);
 }
 
 static void