summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2009-05-19 19:06:27 +0200
committerJoerg Roedel <joerg.roedel@amd.com>2009-05-28 18:09:26 +0200
commit92ac4320af6ed4294c2c221dd4ccbfd9026a3aa7 (patch)
treedc77e4dfbac57240dadf05dc5b1589d511bce80a /arch
parentd91cecdd796c27df46339e80ed436a980c56fcad (diff)
downloadop-kernel-dev-92ac4320af6ed4294c2c221dd4ccbfd9026a3aa7.zip
op-kernel-dev-92ac4320af6ed4294c2c221dd4ccbfd9026a3aa7.tar.gz
amd-iommu: add function to disable all iommus
This function is required for suspend/resume support with AMD IOMMU enabled. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/amd_iommu_init.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c
index feee475..ed10c0f 100644
--- a/arch/x86/kernel/amd_iommu_init.c
+++ b/arch/x86/kernel/amd_iommu_init.c
@@ -252,6 +252,11 @@ static void __init iommu_enable(struct amd_iommu *iommu)
iommu_feature_enable(iommu, CONTROL_IOMMU_EN);
}
+static void iommu_disable(struct amd_iommu *iommu)
+{
+ iommu_feature_disable(iommu, CONTROL_IOMMU_EN);
+}
+
/*
* mapping and unmapping functions for the IOMMU MMIO space. Each AMD IOMMU in
* the system has one.
@@ -945,6 +950,14 @@ static void __init enable_iommus(void)
}
}
+static void disable_iommus(void)
+{
+ struct amd_iommu *iommu;
+
+ for_each_iommu(iommu)
+ iommu_disable(iommu);
+}
+
/*
* Suspend/Resume support
* disable suspend until real resume implemented
OpenPOWER on IntegriCloud