提交 6d073dad 编写于 作者: S Sergei Trofimovich 提交者: Linus Torvalds

ia64: simplify code flow around swiotlb init

Before the change CONFIG_INTEL_IOMMU && !CONFIG_SWIOTLB && !CONFIG_FLATMEM
could skip `set_max_mapnr(max_low_pfn);` if iommu is not present on
system.

Link: https://lkml.kernel.org/r/20210328202439.403601-1-slyfox@gentoo.orgSigned-off-by: NSergei Trofimovich <slyfox@gentoo.org>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 d732f47d
......@@ -644,13 +644,16 @@ mem_init (void)
* _before_ any drivers that may need the PCI DMA interface are
* initialized or bootmem has been freed.
*/
do {
#ifdef CONFIG_INTEL_IOMMU
detect_intel_iommu();
if (!iommu_detected)
detect_intel_iommu();
if (iommu_detected)
break;
#endif
#ifdef CONFIG_SWIOTLB
swiotlb_init(1);
#endif
} while (0);
#ifdef CONFIG_FLATMEM
BUG_ON(!mem_map);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册