Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 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>

authored by

Stefano Stabellini and committed by
Juergen Gross
995d3556 297f7f82

+8 -6
+3 -2
arch/arm/xen/mm.c
··· 81 81 dma_cache_maint(handle, size, GNTTAB_CACHE_INVAL); 82 82 } 83 83 84 - void xen_dma_sync_for_device(dma_addr_t handle, phys_addr_t paddr, size_t size, 85 - enum dma_data_direction dir) 84 + void xen_dma_sync_for_device(struct device *dev, dma_addr_t handle, 85 + phys_addr_t paddr, size_t size, 86 + enum dma_data_direction dir) 86 87 { 87 88 if (pfn_valid(PFN_DOWN(handle))) 88 89 arch_sync_dma_for_device(paddr, size, dir);
+2 -2
drivers/xen/swiotlb-xen.c
··· 408 408 409 409 done: 410 410 if (!dev_is_dma_coherent(dev) && !(attrs & DMA_ATTR_SKIP_CPU_SYNC)) 411 - xen_dma_sync_for_device(dev_addr, phys, size, dir); 411 + xen_dma_sync_for_device(dev, dev_addr, phys, size, dir); 412 412 return dev_addr; 413 413 } 414 414 ··· 458 458 swiotlb_tbl_sync_single(dev, paddr, size, dir, SYNC_FOR_DEVICE); 459 459 460 460 if (!dev_is_dma_coherent(dev)) 461 - xen_dma_sync_for_device(dma_addr, paddr, size, dir); 461 + xen_dma_sync_for_device(dev, dma_addr, paddr, size, dir); 462 462 } 463 463 464 464 /*
+3 -2
include/xen/swiotlb-xen.h
··· 7 7 void xen_dma_sync_for_cpu(struct device *dev, dma_addr_t handle, 8 8 phys_addr_t paddr, size_t size, 9 9 enum dma_data_direction dir); 10 - void xen_dma_sync_for_device(dma_addr_t handle, phys_addr_t paddr, size_t size, 11 - enum dma_data_direction dir); 10 + void xen_dma_sync_for_device(struct device *dev, dma_addr_t handle, 11 + phys_addr_t paddr, size_t size, 12 + enum dma_data_direction dir); 12 13 13 14 extern int xen_swiotlb_init(int verbose, bool early); 14 15 extern const struct dma_map_ops xen_swiotlb_dma_ops;