kernel_optimize_test/arch
Christoph Hellwig 10314e09d0 riscv: add swiotlb support
All RISC-V platforms today lack an IOMMU. However, legacy PCI devices
sometimes require DMA-memory to be in the low 32 bits.  To make this work,
we enable the software-based bounce buffers from swiotlb.  They only impose
overhead when the device in question cannot address the full 64-bit address
space, so a perfect fit.

This patch assumes that DMA is coherent with the processor and the PCI
bus.  It also assumes that the processor and devices share a common
address space. This is true for all RISC-V platforms so far.

[changelog stolen from an earlier patch by Palmer Dabbelt that did the
 more complicated swiotlb wireup before the recent consolidation]

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Palmer Dabbelt <palmer@sifive.com>
2018-05-19 08:46:26 +02:00
..
alpha arch: define the ARCH_DMA_ADDR_T_64BIT config symbol in lib/Kconfig 2018-05-09 06:57:04 +02:00
arc arch: define the ARCH_DMA_ADDR_T_64BIT config symbol in lib/Kconfig 2018-05-09 06:57:04 +02:00
arm swiotlb: move the SWIOTLB config symbol to lib/Kconfig 2018-05-09 06:58:01 +02:00
arm64 swiotlb: move the SWIOTLB config symbol to lib/Kconfig 2018-05-09 06:58:01 +02:00
c6x dma-debug: remove CONFIG_HAVE_DMA_API_DEBUG 2018-05-08 13:03:43 +02:00
h8300 PCI: remove PCI_DMA_BUS_IS_PHYS 2018-05-07 07:15:41 +02:00
hexagon scatterlist: move the NEED_SG_DMA_LENGTH config symbol to lib/Kconfig 2018-05-09 06:55:59 +02:00
ia64 swiotlb: move the SWIOTLB config symbol to lib/Kconfig 2018-05-09 06:58:01 +02:00
m68k PCI: remove PCI_DMA_BUS_IS_PHYS 2018-05-07 07:15:41 +02:00
microblaze dma-debug: remove CONFIG_HAVE_DMA_API_DEBUG 2018-05-08 13:03:43 +02:00
mips swiotlb: move the SWIOTLB config symbol to lib/Kconfig 2018-05-09 06:58:01 +02:00
nds32 page cache: use xa_lock 2018-04-11 10:28:39 -07:00
nios2 nios2 update for v4.17-rc1 2018-04-11 16:02:18 -07:00
openrisc dma-debug: move initialization to common code 2018-05-08 13:02:42 +02:00
parisc dma-mapping: move the NEED_DMA_MAP_STATE config symbol to lib/Kconfig 2018-05-09 06:56:08 +02:00
powerpc swiotlb: move the SWIOTLB config symbol to lib/Kconfig 2018-05-09 06:58:01 +02:00
riscv riscv: add swiotlb support 2018-05-19 08:46:26 +02:00
s390 arch: define the ARCH_DMA_ADDR_T_64BIT config symbol in lib/Kconfig 2018-05-09 06:57:04 +02:00
sh dma-mapping: move the NEED_DMA_MAP_STATE config symbol to lib/Kconfig 2018-05-09 06:56:08 +02:00
sparc arch: define the ARCH_DMA_ADDR_T_64BIT config symbol in lib/Kconfig 2018-05-09 06:57:04 +02:00
um Merge git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml 2018-04-11 16:36:47 -07:00
unicore32 swiotlb: move the SWIOTLB config symbol to lib/Kconfig 2018-05-09 06:58:01 +02:00
x86 swiotlb: move the SWIOTLB config symbol to lib/Kconfig 2018-05-09 06:58:01 +02:00
xtensa dma-debug: remove CONFIG_HAVE_DMA_API_DEBUG 2018-05-08 13:03:43 +02:00
.gitignore
Kconfig dma-debug: remove CONFIG_HAVE_DMA_API_DEBUG 2018-05-08 13:03:43 +02:00