Commit 995d3556 authored by Stefano Stabellini's avatar Stefano Stabellini Committed by Juergen Gross

swiotlb-xen: add struct device * parameter to xen_dma_sync_for_device

No functional changes. The parameter is unused in this patch but will be
used by next patches.
Signed-off-by: default avatarStefano Stabellini <stefano.stabellini@xilinx.com>
Reviewed-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
Tested-by: default avatarCorey Minyard <cminyard@mvista.com>
Tested-by: default avatarRoman Shaposhnik <roman@zededa.com>
Link: https://lore.kernel.org/r/20200710223427.6897-6-sstabellini@kernel.orgSigned-off-by: default avatarJuergen Gross <jgross@suse.com>
parent 297f7f82
...@@ -81,8 +81,9 @@ void xen_dma_sync_for_cpu(struct device *dev, dma_addr_t handle, ...@@ -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); 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, void xen_dma_sync_for_device(struct device *dev, dma_addr_t handle,
enum dma_data_direction dir) phys_addr_t paddr, size_t size,
enum dma_data_direction dir)
{ {
if (pfn_valid(PFN_DOWN(handle))) if (pfn_valid(PFN_DOWN(handle)))
arch_sync_dma_for_device(paddr, size, dir); arch_sync_dma_for_device(paddr, size, dir);
......
...@@ -408,7 +408,7 @@ static dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page, ...@@ -408,7 +408,7 @@ static dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page,
done: done:
if (!dev_is_dma_coherent(dev) && !(attrs & DMA_ATTR_SKIP_CPU_SYNC)) 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; return dev_addr;
} }
...@@ -458,7 +458,7 @@ xen_swiotlb_sync_single_for_device(struct device *dev, dma_addr_t dma_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); swiotlb_tbl_sync_single(dev, paddr, size, dir, SYNC_FOR_DEVICE);
if (!dev_is_dma_coherent(dev)) 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);
} }
/* /*
......
...@@ -7,8 +7,9 @@ ...@@ -7,8 +7,9 @@
void xen_dma_sync_for_cpu(struct device *dev, dma_addr_t handle, void xen_dma_sync_for_cpu(struct device *dev, dma_addr_t handle,
phys_addr_t paddr, size_t size, phys_addr_t paddr, size_t size,
enum dma_data_direction dir); enum dma_data_direction dir);
void xen_dma_sync_for_device(dma_addr_t handle, phys_addr_t paddr, size_t size, void xen_dma_sync_for_device(struct device *dev, dma_addr_t handle,
enum dma_data_direction dir); phys_addr_t paddr, size_t size,
enum dma_data_direction dir);
extern int xen_swiotlb_init(int verbose, bool early); extern int xen_swiotlb_init(int verbose, bool early);
extern const struct dma_map_ops xen_swiotlb_dma_ops; extern const struct dma_map_ops xen_swiotlb_dma_ops;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment