]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: Qualify enabling of swiotlb_init()
authorFlorian Fainelli <f.fainelli@gmail.com>
Fri, 19 Mar 2021 04:03:33 +0000 (21:03 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Sep 2021 12:07:06 +0000 (14:07 +0200)
commit93fc949c59a499c6268748edc183ed208a5836dc
treef14f292f320c11eed4aedbe949f518ad742e64ee
parent57ca1a3305c31d29e9f1b9f474d37a77a2c90327
ARM: Qualify enabling of swiotlb_init()

commit 536feceb27ca41c352bb3c8396b92c4ec22ae3e1 upstream.

We do not need a SWIOTLB unless we have DRAM that is addressable beyond
the arm_dma_limit. Compare max_pfn with arm_dma_pfn_limit to determine
whether we do need a SWIOTLB to be initialized.

Fixes: bc856c0eca9d ("arm: use swiotlb for bounce buffering on LPAE configs")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/mm/init.c