From: Joerg Roedel Date: Fri, 16 Jun 2017 14:09:54 +0000 (+0200) Subject: iommu/amd: Disable IOMMUs at boot if they are enabled X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=111237415393acdef9b4f700c747a2e92c9be62e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git iommu/amd: Disable IOMMUs at boot if they are enabled When booting, make sure the IOMMUs are disabled. They could be previously enabled if we boot into a kexec or kdump kernel. So make sure they are off. Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c index cf7896550e75..f123fa5a7adb 100644 --- a/drivers/iommu/amd_iommu_init.c +++ b/drivers/iommu/amd_iommu_init.c @@ -2318,6 +2318,9 @@ static int __init early_amd_iommu_init(void) if (ret) goto out; + /* Disable any previously enabled IOMMUs */ + disable_iommus(); + if (amd_iommu_irq_remap) amd_iommu_irq_remap = check_ioapic_information();