Skip to content

Commit

Permalink
RISC-V: Use swiotlb on RV64 only
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Zong Li authored and Palmer Dabbelt committed Oct 23, 2018
1 parent 7f47c73 commit 51858aa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/riscv/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 51858aa

Please sign in to comment.