diff options
author | Zong Li <zongbox@gmail.com> | 2018-10-02 16:52:28 +0800 |
---|---|---|
committer | Palmer Dabbelt <palmer@sifive.com> | 2018-10-22 17:02:56 -0700 |
commit | 51858aaf9bea3ddf166bf9d252a1fc351260b497 (patch) | |
tree | 926f7e81e3f7eaae5d6c5d37918078fc4f8e695e /arch/riscv | |
parent | 7f47c73b355f300cf162f3a664e43d557d2cb30d (diff) | |
download | linux-51858aaf9bea3ddf166bf9d252a1fc351260b497.tar.bz2 |
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>
Diffstat (limited to 'arch/riscv')
-rw-r--r-- | arch/riscv/kernel/setup.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c index b2d26d9d8489..c9461985db7e 100644 --- a/arch/riscv/kernel/setup.c +++ b/arch/riscv/kernel/setup.c @@ -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(); |