|
@@ -114,22 +114,30 @@ extern int dmar_remove_dev_scope(struct dmar_pci_notify_info *info,
|
|
|
/* Intel IOMMU detection */
|
|
|
extern int detect_intel_iommu(void);
|
|
|
extern int enable_drhd_fault_handling(void);
|
|
|
-#else
|
|
|
-struct dmar_pci_notify_info;
|
|
|
-static inline int detect_intel_iommu(void)
|
|
|
+
|
|
|
+#ifdef CONFIG_INTEL_IOMMU
|
|
|
+extern int iommu_detected, no_iommu;
|
|
|
+extern int intel_iommu_init(void);
|
|
|
+extern int dmar_parse_one_rmrr(struct acpi_dmar_header *header);
|
|
|
+extern int dmar_parse_one_atsr(struct acpi_dmar_header *header);
|
|
|
+extern int dmar_iommu_notify_scope_dev(struct dmar_pci_notify_info *info);
|
|
|
+#else /* !CONFIG_INTEL_IOMMU: */
|
|
|
+static inline int intel_iommu_init(void) { return -ENODEV; }
|
|
|
+static inline int dmar_parse_one_rmrr(struct acpi_dmar_header *header)
|
|
|
{
|
|
|
- return -ENODEV;
|
|
|
+ return 0;
|
|
|
}
|
|
|
-
|
|
|
-static inline int dmar_table_init(void)
|
|
|
+static inline int dmar_parse_one_atsr(struct acpi_dmar_header *header)
|
|
|
{
|
|
|
- return -ENODEV;
|
|
|
+ return 0;
|
|
|
}
|
|
|
-static inline int enable_drhd_fault_handling(void)
|
|
|
+static inline int dmar_iommu_notify_scope_dev(struct dmar_pci_notify_info *info)
|
|
|
{
|
|
|
- return -1;
|
|
|
+ return 0;
|
|
|
}
|
|
|
-#endif /* !CONFIG_DMAR_TABLE */
|
|
|
+#endif /* CONFIG_INTEL_IOMMU */
|
|
|
+
|
|
|
+#endif /* CONFIG_DMAR_TABLE */
|
|
|
|
|
|
struct irte {
|
|
|
union {
|
|
@@ -177,26 +185,4 @@ extern int dmar_set_interrupt(struct intel_iommu *iommu);
|
|
|
extern irqreturn_t dmar_fault(int irq, void *dev_id);
|
|
|
extern int arch_setup_dmar_msi(unsigned int irq);
|
|
|
|
|
|
-#ifdef CONFIG_INTEL_IOMMU
|
|
|
-extern int iommu_detected, no_iommu;
|
|
|
-extern int dmar_parse_one_rmrr(struct acpi_dmar_header *header);
|
|
|
-extern int dmar_parse_one_atsr(struct acpi_dmar_header *header);
|
|
|
-extern int dmar_iommu_notify_scope_dev(struct dmar_pci_notify_info *info);
|
|
|
-extern int intel_iommu_init(void);
|
|
|
-#else /* !CONFIG_INTEL_IOMMU: */
|
|
|
-static inline int intel_iommu_init(void) { return -ENODEV; }
|
|
|
-static inline int dmar_parse_one_rmrr(struct acpi_dmar_header *header)
|
|
|
-{
|
|
|
- return 0;
|
|
|
-}
|
|
|
-static inline int dmar_parse_one_atsr(struct acpi_dmar_header *header)
|
|
|
-{
|
|
|
- return 0;
|
|
|
-}
|
|
|
-static inline int dmar_iommu_notify_scope_dev(struct dmar_pci_notify_info *info)
|
|
|
-{
|
|
|
- return 0;
|
|
|
-}
|
|
|
-#endif /* CONFIG_INTEL_IOMMU */
|
|
|
-
|
|
|
#endif /* __DMAR_H__ */
|