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 b2d26d9..c946198 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();