Browse Source

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 <jroedel@suse.de>
Joerg Roedel 8 years ago
parent
commit
1112374153
1 changed files with 3 additions and 0 deletions
  1. 3 0
      drivers/iommu/amd_iommu_init.c

+ 3 - 0
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();