diff options
author | Joerg Roedel <jroedel@suse.de> | 2017-06-16 10:09:54 -0400 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2017-06-22 06:54:19 -0400 |
commit | 111237415393acdef9b4f700c747a2e92c9be62e (patch) | |
tree | 48bfe64b182f328c543c7ae00d478284c535d9d2 | |
parent | 54bd63570484167cb13edf81e31fff107b879981 (diff) |
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>
-rw-r--r-- | drivers/iommu/amd_iommu_init.c | 3 |
1 files changed, 3 insertions, 0 deletions
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) | |||
2318 | if (ret) | 2318 | if (ret) |
2319 | goto out; | 2319 | goto out; |
2320 | 2320 | ||
2321 | /* Disable any previously enabled IOMMUs */ | ||
2322 | disable_iommus(); | ||
2323 | |||
2321 | if (amd_iommu_irq_remap) | 2324 | if (amd_iommu_irq_remap) |
2322 | amd_iommu_irq_remap = check_ioapic_information(); | 2325 | amd_iommu_irq_remap = check_ioapic_information(); |
2323 | 2326 | ||