diff options
-rw-r--r-- | arch/x86/kernel/pci-dma.c | 2 | ||||
-rw-r--r-- | drivers/pci/dmar.c | 4 | ||||
-rw-r--r-- | include/linux/dmar.h | 15 |
3 files changed, 8 insertions, 13 deletions
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index 5ca44a9301a0..bed05e2e5890 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c | |||
@@ -294,8 +294,6 @@ static int __init pci_iommu_init(void) | |||
294 | 294 | ||
295 | x86_init.iommu.iommu_init(); | 295 | x86_init.iommu.iommu_init(); |
296 | 296 | ||
297 | intel_iommu_init(); | ||
298 | |||
299 | no_iommu_init(); | 297 | no_iommu_init(); |
300 | return 0; | 298 | return 0; |
301 | } | 299 | } |
diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c index 22b02c6df854..bce9cd7c755a 100644 --- a/drivers/pci/dmar.c +++ b/drivers/pci/dmar.c | |||
@@ -617,6 +617,10 @@ void __init detect_intel_iommu(void) | |||
617 | !dmar_disabled) | 617 | !dmar_disabled) |
618 | iommu_detected = 1; | 618 | iommu_detected = 1; |
619 | #endif | 619 | #endif |
620 | #ifdef CONFIG_X86 | ||
621 | if (ret) | ||
622 | x86_init.iommu.iommu_init = intel_iommu_init; | ||
623 | #endif | ||
620 | } | 624 | } |
621 | early_acpi_os_unmap_memory(dmar_tbl, dmar_tbl_size); | 625 | early_acpi_os_unmap_memory(dmar_tbl, dmar_tbl_size); |
622 | dmar_tbl = NULL; | 626 | dmar_tbl = NULL; |
diff --git a/include/linux/dmar.h b/include/linux/dmar.h index 4a2b162c256a..5de4c9e5856d 100644 --- a/include/linux/dmar.h +++ b/include/linux/dmar.h | |||
@@ -208,16 +208,9 @@ struct dmar_atsr_unit { | |||
208 | u8 include_all:1; /* include all ports */ | 208 | u8 include_all:1; /* include all ports */ |
209 | }; | 209 | }; |
210 | 210 | ||
211 | /* Intel DMAR initialization functions */ | ||
212 | extern int intel_iommu_init(void); | 211 | extern int intel_iommu_init(void); |
213 | #else | 212 | #else /* !CONFIG_DMAR: */ |
214 | static inline int intel_iommu_init(void) | 213 | static inline int intel_iommu_init(void) { return -ENODEV; } |
215 | { | 214 | #endif /* CONFIG_DMAR */ |
216 | #ifdef CONFIG_INTR_REMAP | 215 | |
217 | return dmar_dev_scope_init(); | ||
218 | #else | ||
219 | return -ENODEV; | ||
220 | #endif | ||
221 | } | ||
222 | #endif /* !CONFIG_DMAR */ | ||
223 | #endif /* __DMAR_H__ */ | 216 | #endif /* __DMAR_H__ */ |