RISC-V: Use swiotlb on RV64 only
authorZong Li <zongbox@gmail.com>
Tue, 2 Oct 2018 08:52:28 +0000 (16:52 +0800)
committerPalmer Dabbelt <palmer@sifive.com>
Tue, 23 Oct 2018 00:02:56 +0000 (17:02 -0700)
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>
arch/riscv/kernel/setup.c

index b2d26d9d8489c8e8b6bba01adee0c573fd6564f8..c9461985db7e753bb67da682453ca72163e6b3ed 100644 (file)
@@ -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();