[PATCH 08/12] dma-direct: use phys_to_dma_direct in dma_direct_alloc
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Tony Luck <tony.luck@xxxxxxxxx>, Fenghua Yu <fenghua.yu@xxxxxxxxx>, Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>, iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx
- Subject: [PATCH 08/12] dma-direct: use phys_to_dma_direct in dma_direct_alloc
- From: Christoph Hellwig <hch@xxxxxx>
- Date: Tue, 8 Sep 2020 18:47:54 +0200
- Cc: Tomasz Figa <tfiga@xxxxxxxxxxxx>, Joerg Roedel <joro@xxxxxxxxxx>, Robin Murphy <robin.murphy@xxxxxxx>, linux-doc@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx
- In-reply-to: <20200908164758.3177341-1-hch@lst.de>
- References: <20200908164758.3177341-1-hch@lst.de>
Replace the currently open code copy.
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
---
kernel/dma/direct.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c
index 12e9f5f75dfe4b..57a6e7d7cf8f16 100644
--- a/kernel/dma/direct.c
+++ b/kernel/dma/direct.c
@@ -240,10 +240,7 @@ void *dma_direct_alloc(struct device *dev, size_t size,
goto out_encrypt_pages;
}
done:
- if (force_dma_unencrypted(dev))
- *dma_handle = __phys_to_dma(dev, page_to_phys(page));
- else
- *dma_handle = phys_to_dma(dev, page_to_phys(page));
+ *dma_handle = phys_to_dma_direct(dev, page_to_phys(page));
return ret;
out_encrypt_pages:
--
2.28.0
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]