Skip to content

Commit bf7954e

Browse files
author
Christoph Hellwig
committed
swiotlb-xen: merge xen_unmap_single into xen_swiotlb_unmap_page
No need for a no-op wrapper. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
1 parent b4dca15 commit bf7954e

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

‎drivers/xen/swiotlb-xen.c‎

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -418,9 +418,8 @@ static dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page,
418418
* After this call, reads by the cpu to the buffer are guaranteed to see
419419
* whatever the device wrote there.
420420
*/
421-
static void xen_unmap_single(struct device *hwdev, dma_addr_t dev_addr,
422-
size_t size, enum dma_data_direction dir,
423-
unsigned long attrs)
421+
static void xen_swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr,
422+
size_t size, enum dma_data_direction dir, unsigned long attrs)
424423
{
425424
phys_addr_t paddr = xen_bus_to_phys(dev_addr);
426425

@@ -434,13 +433,6 @@ static void xen_unmap_single(struct device *hwdev, dma_addr_t dev_addr,
434433
swiotlb_tbl_unmap_single(hwdev, paddr, size, dir, attrs);
435434
}
436435

437-
static void xen_swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr,
438-
size_t size, enum dma_data_direction dir,
439-
unsigned long attrs)
440-
{
441-
xen_unmap_single(hwdev, dev_addr, size, dir, attrs);
442-
}
443-
444436
static void
445437
xen_swiotlb_sync_single_for_cpu(struct device *dev, dma_addr_t dma_addr,
446438
size_t size, enum dma_data_direction dir)
@@ -481,7 +473,8 @@ xen_swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sgl, int nelems,
481473
BUG_ON(dir == DMA_NONE);
482474

483475
for_each_sg(sgl, sg, nelems, i)
484-
xen_unmap_single(hwdev, sg->dma_address, sg_dma_len(sg), dir, attrs);
476+
xen_swiotlb_unmap_page(hwdev, sg->dma_address, sg_dma_len(sg),
477+
dir, attrs);
485478

486479
}
487480

0 commit comments

Comments
 (0)