]> git.baikalelectronics.ru Git - kernel.git/commit
riscv: Only initialize swiotlb when necessary
authorKefeng Wang <wangkefeng.wang@huawei.com>
Wed, 2 Jun 2021 08:55:16 +0000 (16:55 +0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Fri, 11 Jun 2021 20:42:26 +0000 (13:42 -0700)
commit9cc1a98da3eeaafd34c3227dfbf21599abfda115
treea2b2e71d99e1ec5a2f187f88bdc279e0370abf7d
parentb83b1b66c1ba0d40d34737a6183ce362b05a8425
riscv: Only initialize swiotlb when necessary

The SWIOTLB buffer is not needed unless the physical address space
is beyond the limit of dma, only initialize swiotlb when swiotlb_force
is true or not all system memory is DMA-able.

Also move the swiotlb_init() into mem_init().

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/kernel/setup.c
arch/riscv/mm/init.c