summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/amd_iommu_types.h
diff options
context:
space:
mode:
authorJoerg Roedel2009-05-04 15:06:20 +0200
committerJoerg Roedel2009-05-28 18:08:50 +0200
commit3bd221724adb9d642270df0e78b0105fb61e4a1c (patch)
treed5c1cf8dc7e42f3da895b61403779f257511d39d /arch/x86/include/asm/amd_iommu_types.h
parentMerge commit 'v2.6.30-rc5' into core/iommu (diff)
downloadkernel-qcow2-linux-3bd221724adb9d642270df0e78b0105fb61e4a1c.tar.gz
kernel-qcow2-linux-3bd221724adb9d642270df0e78b0105fb61e4a1c.tar.xz
kernel-qcow2-linux-3bd221724adb9d642270df0e78b0105fb61e4a1c.zip
amd-iommu: introduce for_each_iommu* macros
This patch introduces the for_each_iommu and for_each_iommu_safe macros to simplify the developers life when having to iterate over all AMD IOMMUs in the system. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch/x86/include/asm/amd_iommu_types.h')
-rw-r--r--arch/x86/include/asm/amd_iommu_types.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/include/asm/amd_iommu_types.h b/arch/x86/include/asm/amd_iommu_types.h
index 95c8cd9d22b5..cf5ef172cfca 100644
--- a/arch/x86/include/asm/amd_iommu_types.h
+++ b/arch/x86/include/asm/amd_iommu_types.h
@@ -196,6 +196,14 @@
domain for an IOMMU */
/*
+ * Make iterating over all IOMMUs easier
+ */
+#define for_each_iommu(iommu) \
+ list_for_each_entry((iommu), &amd_iommu_list, list)
+#define for_each_iommu_safe(iommu, next) \
+ list_for_each_entry_safe((iommu), (next), &amd_iommu_list, list)
+
+/*
* This structure contains generic data for IOMMU protection domains
* independent of their use.
*/