Skip to content

Commit 51858aa

Browse files
zongboxpalmer-dabbelt
authored andcommitted
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>
1 parent 7f47c73 commit 51858aa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/riscv/kernel/setup.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,10 @@ void __init setup_arch(char **cmdline_p)
227227
setup_bootmem();
228228
paging_init();
229229
unflatten_device_tree();
230+
231+
#ifdef CONFIG_SWIOTLB
230232
swiotlb_init(1);
233+
#endif
231234

232235
#ifdef CONFIG_SMP
233236
setup_smp();

0 commit comments

Comments
 (0)