aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dmar.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/dmar.h')
-rw-r--r--include/linux/dmar.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/dmar.h b/include/linux/dmar.h
index 8d3e0e38ca4d..7d683dc8ed1e 100644
--- a/include/linux/dmar.h
+++ b/include/linux/dmar.h
@@ -23,7 +23,14 @@
23 23
24#include <linux/acpi.h> 24#include <linux/acpi.h>
25#include <linux/types.h> 25#include <linux/types.h>
26#include <linux/msi.h>
26 27
28#ifdef CONFIG_DMAR
29struct intel_iommu;
30
31/* Intel IOMMU detection and initialization functions */
32extern void detect_intel_iommu(void);
33extern int intel_iommu_init(void);
27 34
28extern int dmar_table_init(void); 35extern int dmar_table_init(void);
29extern int early_dmar_detect(void); 36extern int early_dmar_detect(void);
@@ -49,4 +56,19 @@ struct dmar_rmrr_unit {
49 int devices_cnt; /* target device count */ 56 int devices_cnt; /* target device count */
50}; 57};
51 58
59#define for_each_drhd_unit(drhd) \
60 list_for_each_entry(drhd, &dmar_drhd_units, list)
61#define for_each_rmrr_units(rmrr) \
62 list_for_each_entry(rmrr, &dmar_rmrr_units, list)
63#else
64static inline void detect_intel_iommu(void)
65{
66 return;
67}
68static inline int intel_iommu_init(void)
69{
70 return -ENODEV;
71}
72
73#endif /* !CONFIG_DMAR */
52#endif /* __DMAR_H__ */ 74#endif /* __DMAR_H__ */