summaryrefslogtreecommitdiffstats
path: root/arch/riscv
diff options
context:
space:
mode:
authorZong Li <zongbox@gmail.com>2018-10-02 10:52:28 +0200
committerPalmer Dabbelt <palmer@sifive.com>2018-10-23 02:02:56 +0200
commit51858aaf9bea3ddf166bf9d252a1fc351260b497 (patch)
tree926f7e81e3f7eaae5d6c5d37918078fc4f8e695e /arch/riscv
parentRISC-V: Build tishift only on 64-bit (diff)
downloadlinux-51858aaf9bea3ddf166bf9d252a1fc351260b497.tar.xz
linux-51858aaf9bea3ddf166bf9d252a1fc351260b497.zip
RISC-V: Use swiotlb on RV64 only
Only RV64 supports swiotlb. On RV32, it don't select the SWIOTLB. Signed-off-by: Zong Li <zong@andestech.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Diffstat (limited to 'arch/riscv')
-rw-r--r--arch/riscv/kernel/setup.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c
index b2d26d9d8489..c9461985db7e 100644
--- a/arch/riscv/kernel/setup.c
+++ b/arch/riscv/kernel/setup.c
@@ -227,7 +227,10 @@ void __init setup_arch(char **cmdline_p)
setup_bootmem();
paging_init();
unflatten_device_tree();
+
+#ifdef CONFIG_SWIOTLB
swiotlb_init(1);
+#endif
#ifdef CONFIG_SMP
setup_smp();