summaryrefslogtreecommitdiffstats
path: root/kernel/dma
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-08-17 17:20:52 +0200
committerChristoph Hellwig <hch@lst.de>2020-09-11 09:11:49 +0200
commit96eb89caf753fd0c26d239d8483d92632fb5be15 (patch)
tree633994853d86b15f063df9d52e32012f12531fba /kernel/dma
parent3773dfe6ea4d220dcccb03827fca94ec3d39bc17 (diff)
downloadlinux-stable-96eb89caf753fd0c26d239d8483d92632fb5be15.tar.gz
linux-stable-96eb89caf753fd0c26d239d8483d92632fb5be15.tar.bz2
linux-stable-96eb89caf753fd0c26d239d8483d92632fb5be15.zip
dma-direct: use phys_to_dma_direct in dma_direct_alloc
Replace the currently open code copy. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Diffstat (limited to 'kernel/dma')
-rw-r--r--kernel/dma/direct.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c
index 12e9f5f75dfe..57a6e7d7cf8f 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: