diff options
| -rw-r--r-- | include/linux/dmar.h | 50 |
1 files changed, 18 insertions, 32 deletions
diff --git a/include/linux/dmar.h b/include/linux/dmar.h index 23c8db129560..1deece46a0ca 100644 --- a/include/linux/dmar.h +++ b/include/linux/dmar.h | |||
| @@ -114,22 +114,30 @@ extern int dmar_remove_dev_scope(struct dmar_pci_notify_info *info, | |||
| 114 | /* Intel IOMMU detection */ | 114 | /* Intel IOMMU detection */ |
| 115 | extern int detect_intel_iommu(void); | 115 | extern int detect_intel_iommu(void); |
| 116 | extern int enable_drhd_fault_handling(void); | 116 | extern int enable_drhd_fault_handling(void); |
| 117 | #else | 117 | |
| 118 | struct dmar_pci_notify_info; | 118 | #ifdef CONFIG_INTEL_IOMMU |
| 119 | static inline int detect_intel_iommu(void) | 119 | extern int iommu_detected, no_iommu; |
| 120 | extern int intel_iommu_init(void); | ||
| 121 | extern int dmar_parse_one_rmrr(struct acpi_dmar_header *header); | ||
| 122 | extern int dmar_parse_one_atsr(struct acpi_dmar_header *header); | ||
| 123 | extern int dmar_iommu_notify_scope_dev(struct dmar_pci_notify_info *info); | ||
| 124 | #else /* !CONFIG_INTEL_IOMMU: */ | ||
| 125 | static inline int intel_iommu_init(void) { return -ENODEV; } | ||
| 126 | static inline int dmar_parse_one_rmrr(struct acpi_dmar_header *header) | ||
| 120 | { | 127 | { |
| 121 | return -ENODEV; | 128 | return 0; |
| 122 | } | 129 | } |
| 123 | 130 | static inline int dmar_parse_one_atsr(struct acpi_dmar_header *header) | |
| 124 | static inline int dmar_table_init(void) | ||
| 125 | { | 131 | { |
| 126 | return -ENODEV; | 132 | return 0; |
| 127 | } | 133 | } |
| 128 | static inline int enable_drhd_fault_handling(void) | 134 | static inline int dmar_iommu_notify_scope_dev(struct dmar_pci_notify_info *info) |
| 129 | { | 135 | { |
| 130 | return -1; | 136 | return 0; |
| 131 | } | 137 | } |
| 132 | #endif /* !CONFIG_DMAR_TABLE */ | 138 | #endif /* CONFIG_INTEL_IOMMU */ |
| 139 | |||
| 140 | #endif /* CONFIG_DMAR_TABLE */ | ||
| 133 | 141 | ||
| 134 | struct irte { | 142 | struct irte { |
| 135 | union { | 143 | union { |
| @@ -177,26 +185,4 @@ extern int dmar_set_interrupt(struct intel_iommu *iommu); | |||
| 177 | extern irqreturn_t dmar_fault(int irq, void *dev_id); | 185 | extern irqreturn_t dmar_fault(int irq, void *dev_id); |
| 178 | extern int arch_setup_dmar_msi(unsigned int irq); | 186 | extern int arch_setup_dmar_msi(unsigned int irq); |
| 179 | 187 | ||
| 180 | #ifdef CONFIG_INTEL_IOMMU | ||
| 181 | extern int iommu_detected, no_iommu; | ||
| 182 | extern int dmar_parse_one_rmrr(struct acpi_dmar_header *header); | ||
| 183 | extern int dmar_parse_one_atsr(struct acpi_dmar_header *header); | ||
| 184 | extern int dmar_iommu_notify_scope_dev(struct dmar_pci_notify_info *info); | ||
| 185 | extern int intel_iommu_init(void); | ||
| 186 | #else /* !CONFIG_INTEL_IOMMU: */ | ||
| 187 | static inline int intel_iommu_init(void) { return -ENODEV; } | ||
| 188 | static inline int dmar_parse_one_rmrr(struct acpi_dmar_header *header) | ||
| 189 | { | ||
| 190 | return 0; | ||
| 191 | } | ||
| 192 | static inline int dmar_parse_one_atsr(struct acpi_dmar_header *header) | ||
| 193 | { | ||
| 194 | return 0; | ||
| 195 | } | ||
| 196 | static inline int dmar_iommu_notify_scope_dev(struct dmar_pci_notify_info *info) | ||
| 197 | { | ||
| 198 | return 0; | ||
| 199 | } | ||
| 200 | #endif /* CONFIG_INTEL_IOMMU */ | ||
| 201 | |||
| 202 | #endif /* __DMAR_H__ */ | 188 | #endif /* __DMAR_H__ */ |
