diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2009-05-04 17:06:20 +0400 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2009-05-28 20:08:50 +0400 |
commit | 3bd221724adb9d642270df0e78b0105fb61e4a1c (patch) | |
tree | d5c1cf8dc7e42f3da895b61403779f257511d39d /arch/x86/include | |
parent | 41fb454ebe6024f5c1e3b3cbc0abc0da762e7b51 (diff) | |
download | linux-3bd221724adb9d642270df0e78b0105fb61e4a1c.tar.xz |
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')
-rw-r--r-- | arch/x86/include/asm/amd_iommu_types.h | 8 |
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. */ |