summaryrefslogtreecommitdiffstats
path: root/arch/x86/mm
diff options
context:
space:
mode:
authorChristoph Hellwig2018-12-03 11:43:54 +0100
committerChristoph Hellwig2018-12-13 21:06:17 +0100
commit55897af63091ebc2c3f239c6a6666f748113ac50 (patch)
tree49340a30e15ae65d71fc5f453559340672064d70 /arch/x86/mm
parentdma-direct: use dma_direct_map_page to implement dma_direct_map_sg (diff)
downloadkernel-qcow2-linux-55897af63091ebc2c3f239c6a6666f748113ac50.tar.gz
kernel-qcow2-linux-55897af63091ebc2c3f239c6a6666f748113ac50.tar.xz
kernel-qcow2-linux-55897af63091ebc2c3f239c6a6666f748113ac50.zip
dma-direct: merge swiotlb_dma_ops into the dma_direct code
While the dma-direct code is (relatively) clean and simple we actually have to use the swiotlb ops for the mapping on many architectures due to devices with addressing limits. Instead of keeping two implementations around this commit allows the dma-direct implementation to call the swiotlb bounce buffering functions and thus share the guts of the mapping implementation. This also simplified the dma-mapping setup on a few architectures where we don't have to differenciate which implementation to use. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Jesper Dangaard Brouer <brouer@redhat.com> Tested-by: Jesper Dangaard Brouer <brouer@redhat.com> Tested-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r--arch/x86/mm/mem_encrypt.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/arch/x86/mm/mem_encrypt.c b/arch/x86/mm/mem_encrypt.c
index 006f373f54ab..385afa2b9e17 100644
--- a/arch/x86/mm/mem_encrypt.c
+++ b/arch/x86/mm/mem_encrypt.c
@@ -381,13 +381,6 @@ void __init mem_encrypt_init(void)
swiotlb_update_mem_attributes();
/*
- * With SEV, DMA operations cannot use encryption, we need to use
- * SWIOTLB to bounce buffer DMA operation.
- */
- if (sev_active())
- dma_ops = &swiotlb_dma_ops;
-
- /*
* With SEV, we need to unroll the rep string I/O instructions.
*/
if (sev_active())