diff options
-rw-r--r-- | arch/ia64/include/asm/iommu.h | 6 | ||||
-rw-r--r-- | drivers/iommu/dmar.c | 13 | ||||
-rw-r--r-- | include/linux/dma_remapping.h | 3 |
3 files changed, 12 insertions, 10 deletions
diff --git a/arch/ia64/include/asm/iommu.h b/arch/ia64/include/asm/iommu.h index 745e095fe82e..95461bb0b8e6 100644 --- a/arch/ia64/include/asm/iommu.h +++ b/arch/ia64/include/asm/iommu.h | |||
@@ -7,12 +7,14 @@ | |||
7 | 7 | ||
8 | extern void pci_iommu_shutdown(void); | 8 | extern void pci_iommu_shutdown(void); |
9 | extern void no_iommu_init(void); | 9 | extern void no_iommu_init(void); |
10 | extern int force_iommu, no_iommu; | ||
11 | extern int iommu_detected; | ||
12 | #ifdef CONFIG_DMAR | 10 | #ifdef CONFIG_DMAR |
11 | extern int force_iommu, no_iommu; | ||
13 | extern int iommu_pass_through; | 12 | extern int iommu_pass_through; |
13 | extern int iommu_detected; | ||
14 | #else | 14 | #else |
15 | #define iommu_pass_through (0) | 15 | #define iommu_pass_through (0) |
16 | #define no_iommu (1) | ||
17 | #define iommu_detected (0) | ||
16 | #endif | 18 | #endif |
17 | extern void iommu_dma_init(void); | 19 | extern void iommu_dma_init(void); |
18 | extern void machvec_init(const char *name); | 20 | extern void machvec_init(const char *name); |
diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index 6f0422dcd0f5..587e8f2d38d8 100644 --- a/drivers/iommu/dmar.c +++ b/drivers/iommu/dmar.c | |||
@@ -551,22 +551,21 @@ int __init detect_intel_iommu(void) | |||
551 | if (ret) | 551 | if (ret) |
552 | ret = check_zero_address(); | 552 | ret = check_zero_address(); |
553 | { | 553 | { |
554 | #ifdef CONFIG_INTR_REMAP | ||
555 | struct acpi_table_dmar *dmar; | 554 | struct acpi_table_dmar *dmar; |
556 | 555 | ||
557 | dmar = (struct acpi_table_dmar *) dmar_tbl; | 556 | dmar = (struct acpi_table_dmar *) dmar_tbl; |
558 | if (ret && cpu_has_x2apic && dmar->flags & 0x1) | 557 | |
558 | if (ret && intr_remapping_enabled && cpu_has_x2apic && | ||
559 | dmar->flags & 0x1) | ||
559 | printk(KERN_INFO | 560 | printk(KERN_INFO |
560 | "Queued invalidation will be enabled to support " | 561 | "Queued invalidation will be enabled to support x2apic and Intr-remapping.\n"); |
561 | "x2apic and Intr-remapping.\n"); | 562 | |
562 | #endif | ||
563 | #ifdef CONFIG_DMAR | ||
564 | if (ret && !no_iommu && !iommu_detected && !dmar_disabled) { | 563 | if (ret && !no_iommu && !iommu_detected && !dmar_disabled) { |
565 | iommu_detected = 1; | 564 | iommu_detected = 1; |
566 | /* Make sure ACS will be enabled */ | 565 | /* Make sure ACS will be enabled */ |
567 | pci_request_acs(); | 566 | pci_request_acs(); |
568 | } | 567 | } |
569 | #endif | 568 | |
570 | #ifdef CONFIG_X86 | 569 | #ifdef CONFIG_X86 |
571 | if (ret) | 570 | if (ret) |
572 | x86_init.iommu.iommu_init = intel_iommu_init; | 571 | x86_init.iommu.iommu_init = intel_iommu_init; |
diff --git a/include/linux/dma_remapping.h b/include/linux/dma_remapping.h index aaa12cb8227a..b98b61b3743e 100644 --- a/include/linux/dma_remapping.h +++ b/include/linux/dma_remapping.h | |||
@@ -30,6 +30,7 @@ struct root_entry; | |||
30 | extern void free_dmar_iommu(struct intel_iommu *iommu); | 30 | extern void free_dmar_iommu(struct intel_iommu *iommu); |
31 | extern int iommu_calculate_agaw(struct intel_iommu *iommu); | 31 | extern int iommu_calculate_agaw(struct intel_iommu *iommu); |
32 | extern int iommu_calculate_max_sagaw(struct intel_iommu *iommu); | 32 | extern int iommu_calculate_max_sagaw(struct intel_iommu *iommu); |
33 | extern int dmar_disabled; | ||
33 | #else | 34 | #else |
34 | static inline int iommu_calculate_agaw(struct intel_iommu *iommu) | 35 | static inline int iommu_calculate_agaw(struct intel_iommu *iommu) |
35 | { | 36 | { |
@@ -42,8 +43,8 @@ static inline int iommu_calculate_max_sagaw(struct intel_iommu *iommu) | |||
42 | static inline void free_dmar_iommu(struct intel_iommu *iommu) | 43 | static inline void free_dmar_iommu(struct intel_iommu *iommu) |
43 | { | 44 | { |
44 | } | 45 | } |
46 | #define dmar_disabled (1) | ||
45 | #endif | 47 | #endif |
46 | 48 | ||
47 | extern int dmar_disabled; | ||
48 | 49 | ||
49 | #endif | 50 | #endif |