]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
iommu/amd: Disable IOMMUs at boot if they are enabled
authorJoerg Roedel <jroedel@suse.de>
Fri, 16 Jun 2017 14:09:54 +0000 (16:09 +0200)
committerJoerg Roedel <jroedel@suse.de>
Thu, 22 Jun 2017 10:54:19 +0000 (12:54 +0200)
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 <jroedel@suse.de>
drivers/iommu/amd_iommu_init.c

index cf7896550e758535aa1d6579feef316d57b734c7..f123fa5a7adb3e6e6ffe23e451b929c2194f7870 100644 (file)
@@ -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();