diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2009-04-03 15:19:32 +0100 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-04-03 21:45:46 +0100 |
commit | 8f912ba4d7cdaf7d31cf39fe5a9b7732308a256d (patch) | |
tree | 2f2e63e48c32471d729289c0772be1a093529228 /include/linux/dmar.h | |
parent | 20bec8ab1458c24bed0d5492ee15d87807fc415a (diff) | |
download | kernel_goldelico_gta04-8f912ba4d7cdaf7d31cf39fe5a9b7732308a256d.zip kernel_goldelico_gta04-8f912ba4d7cdaf7d31cf39fe5a9b7732308a256d.tar.gz kernel_goldelico_gta04-8f912ba4d7cdaf7d31cf39fe5a9b7732308a256d.tar.bz2 |
intel-iommu: Add for_each_iommu() and for_each_active_iommu() macros
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/dmar.h')
-rw-r--r-- | include/linux/dmar.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/dmar.h b/include/linux/dmar.h index 2f34274..0b4aa80 100644 --- a/include/linux/dmar.h +++ b/include/linux/dmar.h @@ -44,6 +44,14 @@ extern struct list_head dmar_drhd_units; #define for_each_drhd_unit(drhd) \ list_for_each_entry(drhd, &dmar_drhd_units, list) +#define for_each_active_iommu(i, drhd) \ + list_for_each_entry(drhd, &dmar_drhd_units, list) \ + if (i=drhd->iommu, drhd->ignored) {} else + +#define for_each_iommu(i, drhd) \ + list_for_each_entry(drhd, &dmar_drhd_units, list) \ + if (i=drhd->iommu, 0) {} else + extern int dmar_table_init(void); extern int dmar_dev_scope_init(void); |