summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBaoquan He <bhe@redhat.com>2017-08-09 10:33:44 +0200
committerJoerg Roedel <jroedel@suse.de>2017-08-15 18:14:41 +0200
commit20b46dff13bd1d250dc968b318f0fac3c996b3fa (patch)
treed4d901fc27c1d4e6b96cb3b5d309b4182efcbeb8 /drivers
parentiommu/amd: Don't copy GCR3 table root pointer (diff)
downloadlinux-20b46dff13bd1d250dc968b318f0fac3c996b3fa.tar.xz
linux-20b46dff13bd1d250dc968b318f0fac3c996b3fa.zip
iommu/amd: Disable iommu only if amd_iommu=off is specified
It's ok to disable iommu early in normal kernel or in kdump kernel when amd_iommu=off is specified. While we should not disable it in kdump kernel when on-flight dma is still on-going. Signed-off-by: Baoquan He <bhe@redhat.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iommu/amd_iommu_init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
index 88e7a6e950ae..c7d03251c80a 100644
--- a/drivers/iommu/amd_iommu_init.c
+++ b/drivers/iommu/amd_iommu_init.c
@@ -2499,7 +2499,8 @@ static int __init early_amd_iommu_init(void)
goto out;
/* Disable any previously enabled IOMMUs */
- disable_iommus();
+ if (!is_kdump_kernel() || amd_iommu_disabled)
+ disable_iommus();
if (amd_iommu_irq_remap)
amd_iommu_irq_remap = check_ioapic_information();