aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/amd_iommu_init.c
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2009-11-20 16:44:01 +0100
committerJoerg Roedel <joerg.roedel@amd.com>2009-11-27 14:16:27 +0100
commitaeb26f55337d4310840c8adc3ec7d6aebb714472 (patch)
tree9ce73b81101613adf42fcee68860dc4e767e0fee /arch/x86/kernel/amd_iommu_init.c
parentx86/amd-iommu: Remove iommu_flush_domain function (diff)
downloadlinux-dev-aeb26f55337d4310840c8adc3ec7d6aebb714472.tar.xz
linux-dev-aeb26f55337d4310840c8adc3ec7d6aebb714472.zip
x86/amd-iommu: Implement protection domain list
This patch adds code to keep a global list of all protection domains. This allows to simplify the resume code. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch/x86/kernel/amd_iommu_init.c')
-rw-r--r--arch/x86/kernel/amd_iommu_init.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c
index 8567d1698027..73d5173765d2 100644
--- a/arch/x86/kernel/amd_iommu_init.c
+++ b/arch/x86/kernel/amd_iommu_init.c
@@ -142,6 +142,12 @@ struct amd_iommu *amd_iommus[MAX_IOMMUS];
int amd_iommus_present;
/*
+ * List of protection domains - used during resume
+ */
+LIST_HEAD(amd_iommu_pd_list);
+spinlock_t amd_iommu_pd_lock;
+
+/*
* Pointer to the device table which is shared by all AMD IOMMUs
* it is indexed by the PCI device id or the HT unit id and contains
* information about the domain the device belongs to as well as the
@@ -1263,6 +1269,8 @@ static int __init amd_iommu_init(void)
*/
amd_iommu_pd_alloc_bitmap[0] = 1;
+ spin_lock_init(&amd_iommu_pd_lock);
+
/*
* now the data structures are allocated and basically initialized
* start the real acpi table scan