summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorJoerg Roedel2009-12-21 15:58:19 +0100
committerJoerg Roedel2009-12-21 15:58:19 +0100
commitce9277fb08e6e721482f7011ca28dcd0449b197c (patch)
treebb677723b4fc5e86a2a6fc19d8eb143f2d168985 /arch/x86
parentdma-debug: Do not add notifier when dma debugging is disabled. (diff)
parentx86/amd-iommu: Fix initialization failure panic (diff)
downloadkernel-qcow2-linux-ce9277fb08e6e721482f7011ca28dcd0449b197c.tar.gz
kernel-qcow2-linux-ce9277fb08e6e721482f7011ca28dcd0449b197c.tar.xz
kernel-qcow2-linux-ce9277fb08e6e721482f7011ca28dcd0449b197c.zip
Merge branches 'dma-debug/fixes' and 'amd-iommu/fixes' into iommu/fixes
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/amd_iommu_init.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c
index 1dca9c34eaeb..fb490ce7dd55 100644
--- a/arch/x86/kernel/amd_iommu_init.c
+++ b/arch/x86/kernel/amd_iommu_init.c
@@ -138,6 +138,11 @@ int amd_iommus_present;
bool amd_iommu_np_cache __read_mostly;
/*
+ * Set to true if ACPI table parsing and hardware intialization went properly
+ */
+static bool amd_iommu_initialized;
+
+/*
* List of protection domains - used during resume
*/
LIST_HEAD(amd_iommu_pd_list);
@@ -929,6 +934,8 @@ static int __init init_iommu_all(struct acpi_table_header *table)
}
WARN_ON(p != end);
+ amd_iommu_initialized = true;
+
return 0;
}
@@ -1263,6 +1270,9 @@ static int __init amd_iommu_init(void)
if (acpi_table_parse("IVRS", init_iommu_all) != 0)
goto free;
+ if (!amd_iommu_initialized)
+ goto free;
+
if (acpi_table_parse("IVRS", init_memory_definitions) != 0)
goto free;