From: Zong Li Date: Tue, 2 Oct 2018 08:52:28 +0000 (+0800) Subject: RISC-V: Use swiotlb on RV64 only X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=51858aaf9bea3ddf166bf9d252a1fc351260b497;p=openwrt%2Fstaging%2Fblogic.git RISC-V: Use swiotlb on RV64 only Only RV64 supports swiotlb. On RV32, it don't select the SWIOTLB. Signed-off-by: Zong Li Reviewed-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt --- 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();