diff options
Diffstat (limited to 'include/linux/dmar.h')
-rw-r--r-- | include/linux/dmar.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/include/linux/dmar.h b/include/linux/dmar.h index b029d1aa2d12..eccb0c0c6cf6 100644 --- a/include/linux/dmar.h +++ b/include/linux/dmar.h | |||
@@ -33,6 +33,7 @@ struct acpi_dmar_header; | |||
33 | #define DMAR_X2APIC_OPT_OUT 0x2 | 33 | #define DMAR_X2APIC_OPT_OUT 0x2 |
34 | 34 | ||
35 | struct intel_iommu; | 35 | struct intel_iommu; |
36 | |||
36 | #ifdef CONFIG_DMAR_TABLE | 37 | #ifdef CONFIG_DMAR_TABLE |
37 | extern struct acpi_table_header *dmar_tbl; | 38 | extern struct acpi_table_header *dmar_tbl; |
38 | struct dmar_drhd_unit { | 39 | struct dmar_drhd_unit { |
@@ -52,6 +53,10 @@ extern struct list_head dmar_drhd_units; | |||
52 | #define for_each_drhd_unit(drhd) \ | 53 | #define for_each_drhd_unit(drhd) \ |
53 | list_for_each_entry(drhd, &dmar_drhd_units, list) | 54 | list_for_each_entry(drhd, &dmar_drhd_units, list) |
54 | 55 | ||
56 | #define for_each_active_drhd_unit(drhd) \ | ||
57 | list_for_each_entry(drhd, &dmar_drhd_units, list) \ | ||
58 | if (drhd->ignored) {} else | ||
59 | |||
55 | #define for_each_active_iommu(i, drhd) \ | 60 | #define for_each_active_iommu(i, drhd) \ |
56 | list_for_each_entry(drhd, &dmar_drhd_units, list) \ | 61 | list_for_each_entry(drhd, &dmar_drhd_units, list) \ |
57 | if (i=drhd->iommu, drhd->ignored) {} else | 62 | if (i=drhd->iommu, drhd->ignored) {} else |
@@ -62,13 +67,13 @@ extern struct list_head dmar_drhd_units; | |||
62 | 67 | ||
63 | extern int dmar_table_init(void); | 68 | extern int dmar_table_init(void); |
64 | extern int dmar_dev_scope_init(void); | 69 | extern int dmar_dev_scope_init(void); |
70 | extern int dmar_parse_dev_scope(void *start, void *end, int *cnt, | ||
71 | struct pci_dev ***devices, u16 segment); | ||
72 | extern void dmar_free_dev_scope(struct pci_dev ***devices, int *cnt); | ||
65 | 73 | ||
66 | /* Intel IOMMU detection */ | 74 | /* Intel IOMMU detection */ |
67 | extern int detect_intel_iommu(void); | 75 | extern int detect_intel_iommu(void); |
68 | extern int enable_drhd_fault_handling(void); | 76 | extern int enable_drhd_fault_handling(void); |
69 | |||
70 | extern int parse_ioapics_under_ir(void); | ||
71 | extern int alloc_iommu(struct dmar_drhd_unit *); | ||
72 | #else | 77 | #else |
73 | static inline int detect_intel_iommu(void) | 78 | static inline int detect_intel_iommu(void) |
74 | { | 79 | { |
@@ -157,8 +162,6 @@ struct dmar_atsr_unit { | |||
157 | int dmar_parse_rmrr_atsr_dev(void); | 162 | int dmar_parse_rmrr_atsr_dev(void); |
158 | extern int dmar_parse_one_rmrr(struct acpi_dmar_header *header); | 163 | extern int dmar_parse_one_rmrr(struct acpi_dmar_header *header); |
159 | extern int dmar_parse_one_atsr(struct acpi_dmar_header *header); | 164 | extern int dmar_parse_one_atsr(struct acpi_dmar_header *header); |
160 | extern int dmar_parse_dev_scope(void *start, void *end, int *cnt, | ||
161 | struct pci_dev ***devices, u16 segment); | ||
162 | extern int intel_iommu_init(void); | 165 | extern int intel_iommu_init(void); |
163 | #else /* !CONFIG_INTEL_IOMMU: */ | 166 | #else /* !CONFIG_INTEL_IOMMU: */ |
164 | static inline int intel_iommu_init(void) { return -ENODEV; } | 167 | static inline int intel_iommu_init(void) { return -ENODEV; } |