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.h13
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
35struct intel_iommu; 35struct intel_iommu;
36
36#ifdef CONFIG_DMAR_TABLE 37#ifdef CONFIG_DMAR_TABLE
37extern struct acpi_table_header *dmar_tbl; 38extern struct acpi_table_header *dmar_tbl;
38struct dmar_drhd_unit { 39struct 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
63extern int dmar_table_init(void); 68extern int dmar_table_init(void);
64extern int dmar_dev_scope_init(void); 69extern int dmar_dev_scope_init(void);
70extern int dmar_parse_dev_scope(void *start, void *end, int *cnt,
71 struct pci_dev ***devices, u16 segment);
72extern void dmar_free_dev_scope(struct pci_dev ***devices, int *cnt);
65 73
66/* Intel IOMMU detection */ 74/* Intel IOMMU detection */
67extern int detect_intel_iommu(void); 75extern int detect_intel_iommu(void);
68extern int enable_drhd_fault_handling(void); 76extern int enable_drhd_fault_handling(void);
69
70extern int parse_ioapics_under_ir(void);
71extern int alloc_iommu(struct dmar_drhd_unit *);
72#else 77#else
73static inline int detect_intel_iommu(void) 78static inline int detect_intel_iommu(void)
74{ 79{
@@ -157,8 +162,6 @@ struct dmar_atsr_unit {
157int dmar_parse_rmrr_atsr_dev(void); 162int dmar_parse_rmrr_atsr_dev(void);
158extern int dmar_parse_one_rmrr(struct acpi_dmar_header *header); 163extern int dmar_parse_one_rmrr(struct acpi_dmar_header *header);
159extern int dmar_parse_one_atsr(struct acpi_dmar_header *header); 164extern int dmar_parse_one_atsr(struct acpi_dmar_header *header);
160extern int dmar_parse_dev_scope(void *start, void *end, int *cnt,
161 struct pci_dev ***devices, u16 segment);
162extern int intel_iommu_init(void); 165extern int intel_iommu_init(void);
163#else /* !CONFIG_INTEL_IOMMU: */ 166#else /* !CONFIG_INTEL_IOMMU: */
164static inline int intel_iommu_init(void) { return -ENODEV; } 167static inline int intel_iommu_init(void) { return -ENODEV; }