Эх сурвалжийг харах

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>
Zong Li 6 жил өмнө
parent
commit
51858aaf9b

+ 3 - 0
arch/riscv/kernel/setup.c

@@ -227,7 +227,10 @@ void __init setup_arch(char **cmdline_p)
 	setup_bootmem();
 	setup_bootmem();
 	paging_init();
 	paging_init();
 	unflatten_device_tree();
 	unflatten_device_tree();
+
+#ifdef CONFIG_SWIOTLB
 	swiotlb_init(1);
 	swiotlb_init(1);
+#endif
 
 
 #ifdef CONFIG_SMP
 #ifdef CONFIG_SMP
 	setup_smp();
 	setup_smp();