diff options
author | Christoph Hellwig <hch@lst.de> | 2020-08-17 17:34:03 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-09-11 09:14:43 +0200 |
commit | 5ceda74093a5c1c3f42a02b894df031f3bbc9af1 (patch) | |
tree | d16c05bab2364724baff7d1e28a71e535628250a /kernel/dma/swiotlb.c | |
parent | 7bc5c428a660d4d1bc95ba54bf4cb6bccf8c3029 (diff) | |
download | linux-5ceda74093a5c1c3f42a02b894df031f3bbc9af1.tar.gz linux-5ceda74093a5c1c3f42a02b894df031f3bbc9af1.tar.bz2 linux-5ceda74093a5c1c3f42a02b894df031f3bbc9af1.zip |
dma-direct: rename and cleanup __phys_to_dma
The __phys_to_dma vs phys_to_dma distinction isn't exactly obvious. Try
to improve the situation by renaming __phys_to_dma to
phys_to_dma_unencryped, and not forcing architectures that want to
override phys_to_dma to actually provide __phys_to_dma.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Diffstat (limited to 'kernel/dma/swiotlb.c')
-rw-r--r-- | kernel/dma/swiotlb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c index c19379fabd20..4ea72d145cd2 100644 --- a/kernel/dma/swiotlb.c +++ b/kernel/dma/swiotlb.c @@ -670,13 +670,13 @@ dma_addr_t swiotlb_map(struct device *dev, phys_addr_t paddr, size_t size, swiotlb_force); swiotlb_addr = swiotlb_tbl_map_single(dev, - __phys_to_dma(dev, io_tlb_start), + phys_to_dma_unencrypted(dev, io_tlb_start), paddr, size, size, dir, attrs); if (swiotlb_addr == (phys_addr_t)DMA_MAPPING_ERROR) return DMA_MAPPING_ERROR; /* Ensure that the address returned is DMA'ble */ - dma_addr = __phys_to_dma(dev, swiotlb_addr); + dma_addr = phys_to_dma_unencrypted(dev, swiotlb_addr); if (unlikely(!dma_capable(dev, dma_addr, size, true))) { swiotlb_tbl_unmap_single(dev, swiotlb_addr, size, size, dir, attrs | DMA_ATTR_SKIP_CPU_SYNC); |