]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
swiotlb-xen: add struct device * parameter to xen_dma_sync_for_device
authorStefano Stabellini <stefano.stabellini@xilinx.com>
Fri, 10 Jul 2020 22:34:22 +0000 (15:34 -0700)
committerJuergen Gross <jgross@suse.com>
Tue, 4 Aug 2020 05:48:08 +0000 (07:48 +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-6-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 1a00e8003c645ac20c0dc5afc9899f23b27432ad..f2414ea40a794643cf10df97a1eb0a2946b3b358 100644 (file)
@@ -81,8 +81,9 @@ void xen_dma_sync_for_cpu(struct device *dev, dma_addr_t handle,
                dma_cache_maint(handle, size, GNTTAB_CACHE_INVAL);
 }
 
-void xen_dma_sync_for_device(dma_addr_t handle, phys_addr_t paddr, size_t size,
-               enum dma_data_direction dir)
+void xen_dma_sync_for_device(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_device(paddr, size, dir);
index d04b7a15124f5e59013f366add9a607f607a09c3..8a3a7bcc5ec04596376ed4e6f8b115bffb4425dd 100644 (file)
@@ -408,7 +408,7 @@ static dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page,
 
 done:
        if (!dev_is_dma_coherent(dev) && !(attrs & DMA_ATTR_SKIP_CPU_SYNC))
-               xen_dma_sync_for_device(dev_addr, phys, size, dir);
+               xen_dma_sync_for_device(dev, dev_addr, phys, size, dir);
        return dev_addr;
 }
 
@@ -458,7 +458,7 @@ xen_swiotlb_sync_single_for_device(struct device *dev, dma_addr_t dma_addr,
                swiotlb_tbl_sync_single(dev, paddr, size, dir, SYNC_FOR_DEVICE);
 
        if (!dev_is_dma_coherent(dev))
-               xen_dma_sync_for_device(dma_addr, paddr, size, dir);
+               xen_dma_sync_for_device(dev, dma_addr, paddr, size, dir);
 }
 
 /*
index f62d1854780bb288e8cd93254be11273a505095b..6d235fe2b92d0c90f399133677db1d0b3ce15209 100644 (file)
@@ -7,8 +7,9 @@
 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);
+void xen_dma_sync_for_device(struct device *dev, dma_addr_t handle,
+                            phys_addr_t paddr, size_t size,
+                            enum dma_data_direction dir);
 
 extern int xen_swiotlb_init(int verbose, bool early);
 extern const struct dma_map_ops xen_swiotlb_dma_ops;