]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
swiotlb-xen: add struct device * parameter to xen_dma_sync_for_cpu
authorStefano Stabellini <stefano.stabellini@xilinx.com>
Fri, 10 Jul 2020 22:34:21 +0000 (15:34 -0700)
committerJuergen Gross <jgross@suse.com>
Tue, 4 Aug 2020 05:47:03 +0000 (07:47 +0200)
No functional changes. The parameter is unused in this patch but will be
used by next patches.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Tested-by: Corey Minyard <cminyard@mvista.com>
Tested-by: Roman Shaposhnik <roman@zededa.com>
Link: https://lore.kernel.org/r/20200710223427.6897-5-sstabellini@kernel.org
Signed-off-by: Juergen Gross <jgross@suse.com>
arch/arm/xen/mm.c
drivers/xen/swiotlb-xen.c
include/xen/swiotlb-xen.h

index d40e9e5fc52b7aac89848939e88b671f9dd8d2c3..1a00e8003c645ac20c0dc5afc9899f23b27432ad 100644 (file)
@@ -71,8 +71,9 @@ static void dma_cache_maint(dma_addr_t handle, size_t size, u32 op)
  * pfn_valid returns true the pages is local and we can use the native
  * dma-direct functions, otherwise we call the Xen specific version.
  */
-void xen_dma_sync_for_cpu(dma_addr_t handle, phys_addr_t paddr, size_t size,
-               enum dma_data_direction dir)
+void xen_dma_sync_for_cpu(struct device *dev, dma_addr_t handle,
+                         phys_addr_t paddr, size_t size,
+                         enum dma_data_direction dir)
 {
        if (pfn_valid(PFN_DOWN(handle)))
                arch_sync_dma_for_cpu(paddr, size, dir);
index a8e447137faf9554a1003d8b8ef122e5ed987b06..d04b7a15124f5e59013f366add9a607f607a09c3 100644 (file)
@@ -428,7 +428,7 @@ static void xen_swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr,
        BUG_ON(dir == DMA_NONE);
 
        if (!dev_is_dma_coherent(hwdev) && !(attrs & DMA_ATTR_SKIP_CPU_SYNC))
-               xen_dma_sync_for_cpu(dev_addr, paddr, size, dir);
+               xen_dma_sync_for_cpu(hwdev, dev_addr, paddr, size, dir);
 
        /* NOTE: We use dev_addr here, not paddr! */
        if (is_xen_swiotlb_buffer(dev_addr))
@@ -442,7 +442,7 @@ xen_swiotlb_sync_single_for_cpu(struct device *dev, dma_addr_t dma_addr,
        phys_addr_t paddr = xen_bus_to_phys(dev, dma_addr);
 
        if (!dev_is_dma_coherent(dev))
-               xen_dma_sync_for_cpu(dma_addr, paddr, size, dir);
+               xen_dma_sync_for_cpu(dev, dma_addr, paddr, size, dir);
 
        if (is_xen_swiotlb_buffer(dma_addr))
                swiotlb_tbl_sync_single(dev, paddr, size, dir, SYNC_FOR_CPU);
index ffc0d3902b71735fb199bc69397f5514de1d088f..f62d1854780bb288e8cd93254be11273a505095b 100644 (file)
@@ -4,8 +4,9 @@
 
 #include <linux/swiotlb.h>
 
-void xen_dma_sync_for_cpu(dma_addr_t handle, phys_addr_t paddr, size_t size,
-               enum dma_data_direction dir);
+void xen_dma_sync_for_cpu(struct device *dev, dma_addr_t handle,
+                         phys_addr_t paddr, size_t size,
+                         enum dma_data_direction dir);
 void xen_dma_sync_for_device(dma_addr_t handle, phys_addr_t paddr, size_t size,
                enum dma_data_direction dir);