aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/ia64/configs/generic_defconfig2
-rw-r--r--arch/ia64/dig/Makefile2
-rw-r--r--arch/ia64/include/asm/device.h2
-rw-r--r--arch/ia64/include/asm/iommu.h2
-rw-r--r--arch/ia64/include/asm/pci.h2
-rw-r--r--arch/ia64/kernel/Makefile2
-rw-r--r--arch/ia64/kernel/acpi.c4
-rw-r--r--arch/ia64/kernel/msi_ia64.c4
-rw-r--r--arch/ia64/kernel/pci-dma.c2
-rw-r--r--arch/x86/Kconfig6
-rw-r--r--arch/x86/configs/x86_64_defconfig4
-rw-r--r--arch/x86/include/asm/device.h2
-rw-r--r--arch/x86/include/asm/hw_irq.h2
-rw-r--r--arch/x86/include/asm/irq_remapping.h2
-rw-r--r--arch/x86/kernel/apic/apic.c2
-rw-r--r--arch/x86/kernel/apic/io_apic.c8
-rw-r--r--drivers/char/agp/intel-gtt.c4
-rw-r--r--drivers/iommu/Kconfig25
-rw-r--r--drivers/iommu/Makefile5
-rw-r--r--drivers/iommu/intel-iommu.c10
-rw-r--r--drivers/pci/quirks.c2
-rw-r--r--include/linux/dma_remapping.h2
-rw-r--r--include/linux/dmar.h12
-rw-r--r--include/linux/intel-iommu.h6
24 files changed, 60 insertions, 54 deletions
diff --git a/arch/ia64/configs/generic_defconfig b/arch/ia64/configs/generic_defconfig
index 0e5cd1405e0e..43ab1cd097a5 100644
--- a/arch/ia64/configs/generic_defconfig
+++ b/arch/ia64/configs/generic_defconfig
@@ -234,4 +234,4 @@ CONFIG_CRYPTO_MD5=y
234# CONFIG_CRYPTO_ANSI_CPRNG is not set 234# CONFIG_CRYPTO_ANSI_CPRNG is not set
235CONFIG_CRC_T10DIF=y 235CONFIG_CRC_T10DIF=y
236CONFIG_MISC_DEVICES=y 236CONFIG_MISC_DEVICES=y
237CONFIG_DMAR=y 237CONFIG_INTEL_IOMMU=y
diff --git a/arch/ia64/dig/Makefile b/arch/ia64/dig/Makefile
index 2f7caddf093e..ae16ec4f6308 100644
--- a/arch/ia64/dig/Makefile
+++ b/arch/ia64/dig/Makefile
@@ -6,7 +6,7 @@
6# 6#
7 7
8obj-y := setup.o 8obj-y := setup.o
9ifeq ($(CONFIG_DMAR), y) 9ifeq ($(CONFIG_INTEL_IOMMU), y)
10obj-$(CONFIG_IA64_GENERIC) += machvec.o machvec_vtd.o 10obj-$(CONFIG_IA64_GENERIC) += machvec.o machvec_vtd.o
11else 11else
12obj-$(CONFIG_IA64_GENERIC) += machvec.o 12obj-$(CONFIG_IA64_GENERIC) += machvec.o
diff --git a/arch/ia64/include/asm/device.h b/arch/ia64/include/asm/device.h
index d66d446b127c..d05e78f6db94 100644
--- a/arch/ia64/include/asm/device.h
+++ b/arch/ia64/include/asm/device.h
@@ -10,7 +10,7 @@ struct dev_archdata {
10#ifdef CONFIG_ACPI 10#ifdef CONFIG_ACPI
11 void *acpi_handle; 11 void *acpi_handle;
12#endif 12#endif
13#ifdef CONFIG_DMAR 13#ifdef CONFIG_INTEL_IOMMU
14 void *iommu; /* hook for IOMMU specific extension */ 14 void *iommu; /* hook for IOMMU specific extension */
15#endif 15#endif
16}; 16};
diff --git a/arch/ia64/include/asm/iommu.h b/arch/ia64/include/asm/iommu.h
index 95461bb0b8e6..105c93b00b1b 100644
--- a/arch/ia64/include/asm/iommu.h
+++ b/arch/ia64/include/asm/iommu.h
@@ -7,7 +7,7 @@
7 7
8extern void pci_iommu_shutdown(void); 8extern void pci_iommu_shutdown(void);
9extern void no_iommu_init(void); 9extern void no_iommu_init(void);
10#ifdef CONFIG_DMAR 10#ifdef CONFIG_INTEL_IOMMU
11extern int force_iommu, no_iommu; 11extern int force_iommu, no_iommu;
12extern int iommu_pass_through; 12extern int iommu_pass_through;
13extern int iommu_detected; 13extern int iommu_detected;
diff --git a/arch/ia64/include/asm/pci.h b/arch/ia64/include/asm/pci.h
index 73b5f785e70c..127dd7be346a 100644
--- a/arch/ia64/include/asm/pci.h
+++ b/arch/ia64/include/asm/pci.h
@@ -139,7 +139,7 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
139 return channel ? isa_irq_to_vector(15) : isa_irq_to_vector(14); 139 return channel ? isa_irq_to_vector(15) : isa_irq_to_vector(14);
140} 140}
141 141
142#ifdef CONFIG_DMAR 142#ifdef CONFIG_INTEL_IOMMU
143extern void pci_iommu_alloc(void); 143extern void pci_iommu_alloc(void);
144#endif 144#endif
145#endif /* _ASM_IA64_PCI_H */ 145#endif /* _ASM_IA64_PCI_H */
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
index 395c2f216dd8..d959c84904be 100644
--- a/arch/ia64/kernel/Makefile
+++ b/arch/ia64/kernel/Makefile
@@ -43,7 +43,7 @@ obj-$(CONFIG_IA64_ESI) += esi.o
43ifneq ($(CONFIG_IA64_ESI),) 43ifneq ($(CONFIG_IA64_ESI),)
44obj-y += esi_stub.o # must be in kernel proper 44obj-y += esi_stub.o # must be in kernel proper
45endif 45endif
46obj-$(CONFIG_DMAR) += pci-dma.o 46obj-$(CONFIG_INTEL_IOMMU) += pci-dma.o
47obj-$(CONFIG_SWIOTLB) += pci-swiotlb.o 47obj-$(CONFIG_SWIOTLB) += pci-swiotlb.o
48 48
49obj-$(CONFIG_BINFMT_ELF) += elfcore.o 49obj-$(CONFIG_BINFMT_ELF) += elfcore.o
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index 3be485a300b1..bfb4d01e0e51 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -88,7 +88,7 @@ acpi_get_sysname(void)
88 struct acpi_table_rsdp *rsdp; 88 struct acpi_table_rsdp *rsdp;
89 struct acpi_table_xsdt *xsdt; 89 struct acpi_table_xsdt *xsdt;
90 struct acpi_table_header *hdr; 90 struct acpi_table_header *hdr;
91#ifdef CONFIG_DMAR 91#ifdef CONFIG_INTEL_IOMMU
92 u64 i, nentries; 92 u64 i, nentries;
93#endif 93#endif
94 94
@@ -125,7 +125,7 @@ acpi_get_sysname(void)
125 return "xen"; 125 return "xen";
126 } 126 }
127 127
128#ifdef CONFIG_DMAR 128#ifdef CONFIG_INTEL_IOMMU
129 /* Look for Intel IOMMU */ 129 /* Look for Intel IOMMU */
130 nentries = (hdr->length - sizeof(*hdr)) / 130 nentries = (hdr->length - sizeof(*hdr)) /
131 sizeof(xsdt->table_offset_entry[0]); 131 sizeof(xsdt->table_offset_entry[0]);
diff --git a/arch/ia64/kernel/msi_ia64.c b/arch/ia64/kernel/msi_ia64.c
index 009df5434a7a..94e0db72d4a6 100644
--- a/arch/ia64/kernel/msi_ia64.c
+++ b/arch/ia64/kernel/msi_ia64.c
@@ -131,7 +131,7 @@ void arch_teardown_msi_irq(unsigned int irq)
131 return ia64_teardown_msi_irq(irq); 131 return ia64_teardown_msi_irq(irq);
132} 132}
133 133
134#ifdef CONFIG_DMAR 134#ifdef CONFIG_INTEL_IOMMU
135#ifdef CONFIG_SMP 135#ifdef CONFIG_SMP
136static int dmar_msi_set_affinity(struct irq_data *data, 136static int dmar_msi_set_affinity(struct irq_data *data,
137 const struct cpumask *mask, bool force) 137 const struct cpumask *mask, bool force)
@@ -210,5 +210,5 @@ int arch_setup_dmar_msi(unsigned int irq)
210 "edge"); 210 "edge");
211 return 0; 211 return 0;
212} 212}
213#endif /* CONFIG_DMAR */ 213#endif /* CONFIG_INTEL_IOMMU */
214 214
diff --git a/arch/ia64/kernel/pci-dma.c b/arch/ia64/kernel/pci-dma.c
index f6b1ff0aea76..c16162c70860 100644
--- a/arch/ia64/kernel/pci-dma.c
+++ b/arch/ia64/kernel/pci-dma.c
@@ -14,7 +14,7 @@
14 14
15#include <asm/system.h> 15#include <asm/system.h>
16 16
17#ifdef CONFIG_DMAR 17#ifdef CONFIG_INTEL_IOMMU
18 18
19#include <linux/kernel.h> 19#include <linux/kernel.h>
20 20
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 6a47bb22657f..b8cd5448b0e1 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -130,7 +130,7 @@ config SBUS
130 bool 130 bool
131 131
132config NEED_DMA_MAP_STATE 132config NEED_DMA_MAP_STATE
133 def_bool (X86_64 || DMAR || DMA_API_DEBUG) 133 def_bool (X86_64 || INTEL_IOMMU || DMA_API_DEBUG)
134 134
135config NEED_SG_DMA_LENGTH 135config NEED_SG_DMA_LENGTH
136 def_bool y 136 def_bool y
@@ -220,7 +220,7 @@ config ARCH_SUPPORTS_DEBUG_PAGEALLOC
220 220
221config HAVE_INTEL_TXT 221config HAVE_INTEL_TXT
222 def_bool y 222 def_bool y
223 depends on EXPERIMENTAL && DMAR && ACPI 223 depends on EXPERIMENTAL && INTEL_IOMMU && ACPI
224 224
225config X86_32_SMP 225config X86_32_SMP
226 def_bool y 226 def_bool y
@@ -287,7 +287,7 @@ config SMP
287 287
288config X86_X2APIC 288config X86_X2APIC
289 bool "Support x2apic" 289 bool "Support x2apic"
290 depends on X86_LOCAL_APIC && X86_64 && INTR_REMAP 290 depends on X86_LOCAL_APIC && X86_64 && IRQ_REMAP
291 ---help--- 291 ---help---
292 This enables x2apic support on CPUs that have this feature. 292 This enables x2apic support on CPUs that have this feature.
293 293
diff --git a/arch/x86/configs/x86_64_defconfig b/arch/x86/configs/x86_64_defconfig
index 22a0dc8e51dd..058a35b8286c 100644
--- a/arch/x86/configs/x86_64_defconfig
+++ b/arch/x86/configs/x86_64_defconfig
@@ -67,8 +67,8 @@ CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
67CONFIG_CPU_FREQ_GOV_ONDEMAND=y 67CONFIG_CPU_FREQ_GOV_ONDEMAND=y
68CONFIG_X86_ACPI_CPUFREQ=y 68CONFIG_X86_ACPI_CPUFREQ=y
69CONFIG_PCI_MMCONFIG=y 69CONFIG_PCI_MMCONFIG=y
70CONFIG_DMAR=y 70CONFIG_INTEL_IOMMU=y
71# CONFIG_DMAR_DEFAULT_ON is not set 71# CONFIG_INTEL_IOMMU_DEFAULT_ON is not set
72CONFIG_PCIEPORTBUS=y 72CONFIG_PCIEPORTBUS=y
73CONFIG_PCCARD=y 73CONFIG_PCCARD=y
74CONFIG_YENTA=y 74CONFIG_YENTA=y
diff --git a/arch/x86/include/asm/device.h b/arch/x86/include/asm/device.h
index 029f230ab637..63a2a03d7d51 100644
--- a/arch/x86/include/asm/device.h
+++ b/arch/x86/include/asm/device.h
@@ -8,7 +8,7 @@ struct dev_archdata {
8#ifdef CONFIG_X86_64 8#ifdef CONFIG_X86_64
9struct dma_map_ops *dma_ops; 9struct dma_map_ops *dma_ops;
10#endif 10#endif
11#if defined(CONFIG_DMAR) || defined(CONFIG_AMD_IOMMU) 11#if defined(CONFIG_INTEL_IOMMU) || defined(CONFIG_AMD_IOMMU)
12 void *iommu; /* hook for IOMMU specific extension */ 12 void *iommu; /* hook for IOMMU specific extension */
13#endif 13#endif
14}; 14};
diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h
index 09199052060f..eb92a6ed2be7 100644
--- a/arch/x86/include/asm/hw_irq.h
+++ b/arch/x86/include/asm/hw_irq.h
@@ -119,7 +119,7 @@ struct irq_cfg {
119 cpumask_var_t old_domain; 119 cpumask_var_t old_domain;
120 u8 vector; 120 u8 vector;
121 u8 move_in_progress : 1; 121 u8 move_in_progress : 1;
122#ifdef CONFIG_INTR_REMAP 122#ifdef CONFIG_IRQ_REMAP
123 struct irq_2_iommu irq_2_iommu; 123 struct irq_2_iommu irq_2_iommu;
124#endif 124#endif
125}; 125};
diff --git a/arch/x86/include/asm/irq_remapping.h b/arch/x86/include/asm/irq_remapping.h
index 7000f0f8bf12..47d99934580f 100644
--- a/arch/x86/include/asm/irq_remapping.h
+++ b/arch/x86/include/asm/irq_remapping.h
@@ -3,7 +3,7 @@
3 3
4#define IRTE_DEST(dest) ((x2apic_mode) ? dest : dest << 8) 4#define IRTE_DEST(dest) ((x2apic_mode) ? dest : dest << 8)
5 5
6#ifdef CONFIG_INTR_REMAP 6#ifdef CONFIG_IRQ_REMAP
7static void irq_remap_modify_chip_defaults(struct irq_chip *chip); 7static void irq_remap_modify_chip_defaults(struct irq_chip *chip);
8static inline void prepare_irte(struct irte *irte, int vector, 8static inline void prepare_irte(struct irte *irte, int vector,
9 unsigned int dest) 9 unsigned int dest)
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 6b9874a5c7af..a2fd72e0ab35 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1437,7 +1437,7 @@ void enable_x2apic(void)
1437 1437
1438int __init enable_IR(void) 1438int __init enable_IR(void)
1439{ 1439{
1440#ifdef CONFIG_INTR_REMAP 1440#ifdef CONFIG_IRQ_REMAP
1441 if (!intr_remapping_supported()) { 1441 if (!intr_remapping_supported()) {
1442 pr_debug("intr-remapping not supported\n"); 1442 pr_debug("intr-remapping not supported\n");
1443 return -1; 1443 return -1;
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index e75d7e2223fe..620da6fed6b7 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -2254,7 +2254,7 @@ ioapic_set_affinity(struct irq_data *data, const struct cpumask *mask,
2254 return ret; 2254 return ret;
2255} 2255}
2256 2256
2257#ifdef CONFIG_INTR_REMAP 2257#ifdef CONFIG_IRQ_REMAP
2258 2258
2259/* 2259/*
2260 * Migrate the IO-APIC irq in the presence of intr-remapping. 2260 * Migrate the IO-APIC irq in the presence of intr-remapping.
@@ -2560,7 +2560,7 @@ static void ack_apic_level(struct irq_data *data)
2560 } 2560 }
2561} 2561}
2562 2562
2563#ifdef CONFIG_INTR_REMAP 2563#ifdef CONFIG_IRQ_REMAP
2564static void ir_ack_apic_edge(struct irq_data *data) 2564static void ir_ack_apic_edge(struct irq_data *data)
2565{ 2565{
2566 ack_APIC_irq(); 2566 ack_APIC_irq();
@@ -2587,7 +2587,7 @@ static void irq_remap_modify_chip_defaults(struct irq_chip *chip)
2587 chip->irq_set_affinity = ir_ioapic_set_affinity; 2587 chip->irq_set_affinity = ir_ioapic_set_affinity;
2588#endif 2588#endif
2589} 2589}
2590#endif /* CONFIG_INTR_REMAP */ 2590#endif /* CONFIG_IRQ_REMAP */
2591 2591
2592static struct irq_chip ioapic_chip __read_mostly = { 2592static struct irq_chip ioapic_chip __read_mostly = {
2593 .name = "IO-APIC", 2593 .name = "IO-APIC",
@@ -3285,7 +3285,7 @@ void native_teardown_msi_irq(unsigned int irq)
3285 destroy_irq(irq); 3285 destroy_irq(irq);
3286} 3286}
3287 3287
3288#if defined (CONFIG_DMAR) || defined (CONFIG_INTR_REMAP) 3288#ifdef CONFIG_DMAR_TABLE
3289#ifdef CONFIG_SMP 3289#ifdef CONFIG_SMP
3290static int 3290static int
3291dmar_msi_set_affinity(struct irq_data *data, const struct cpumask *mask, 3291dmar_msi_set_affinity(struct irq_data *data, const struct cpumask *mask,
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index 85151019dde1..2774ac1086d3 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -30,10 +30,10 @@
30/* 30/*
31 * If we have Intel graphics, we're not going to have anything other than 31 * If we have Intel graphics, we're not going to have anything other than
32 * an Intel IOMMU. So make the correct use of the PCI DMA API contingent 32 * an Intel IOMMU. So make the correct use of the PCI DMA API contingent
33 * on the Intel IOMMU support (CONFIG_DMAR). 33 * on the Intel IOMMU support (CONFIG_INTEL_IOMMU).
34 * Only newer chipsets need to bother with this, of course. 34 * Only newer chipsets need to bother with this, of course.
35 */ 35 */
36#ifdef CONFIG_DMAR 36#ifdef CONFIG_INTEL_IOMMU
37#define USE_PCI_DMA_API 1 37#define USE_PCI_DMA_API 1
38#else 38#else
39#define USE_PCI_DMA_API 0 39#define USE_PCI_DMA_API 0
diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index b57b3fa492f3..7d7eaa15e773 100644
--- a/drivers/iommu/Kconfig
+++ b/drivers/iommu/Kconfig
@@ -59,10 +59,14 @@ config AMD_IOMMU_STATS
59 If unsure, say N. 59 If unsure, say N.
60 60
61# Intel IOMMU support 61# Intel IOMMU support
62config DMAR 62config DMAR_TABLE
63 bool "Support for DMA Remapping Devices" 63 bool
64
65config INTEL_IOMMU
66 bool "Support for Intel IOMMU using DMA Remapping Devices"
64 depends on PCI_MSI && ACPI && (X86 || IA64_GENERIC) 67 depends on PCI_MSI && ACPI && (X86 || IA64_GENERIC)
65 select IOMMU_API 68 select IOMMU_API
69 select DMAR_TABLE
66 help 70 help
67 DMA remapping (DMAR) devices support enables independent address 71 DMA remapping (DMAR) devices support enables independent address
68 translations for Direct Memory Access (DMA) from devices. 72 translations for Direct Memory Access (DMA) from devices.
@@ -70,18 +74,18 @@ config DMAR
70 and include PCI device scope covered by these DMA 74 and include PCI device scope covered by these DMA
71 remapping devices. 75 remapping devices.
72 76
73config DMAR_DEFAULT_ON 77config INTEL_IOMMU_DEFAULT_ON
74 def_bool y 78 def_bool y
75 prompt "Enable DMA Remapping Devices by default" 79 prompt "Enable Intel DMA Remapping Devices by default"
76 depends on DMAR 80 depends on INTEL_IOMMU
77 help 81 help
78 Selecting this option will enable a DMAR device at boot time if 82 Selecting this option will enable a DMAR device at boot time if
79 one is found. If this option is not selected, DMAR support can 83 one is found. If this option is not selected, DMAR support can
80 be enabled by passing intel_iommu=on to the kernel. 84 be enabled by passing intel_iommu=on to the kernel.
81 85
82config DMAR_BROKEN_GFX_WA 86config INTEL_IOMMU_BROKEN_GFX_WA
83 bool "Workaround broken graphics drivers (going away soon)" 87 bool "Workaround broken graphics drivers (going away soon)"
84 depends on DMAR && BROKEN && X86 88 depends on INTEL_IOMMU && BROKEN && X86
85 ---help--- 89 ---help---
86 Current Graphics drivers tend to use physical address 90 Current Graphics drivers tend to use physical address
87 for DMA and avoid using DMA APIs. Setting this config 91 for DMA and avoid using DMA APIs. Setting this config
@@ -90,18 +94,19 @@ config DMAR_BROKEN_GFX_WA
90 to use physical addresses for DMA, at least until this 94 to use physical addresses for DMA, at least until this
91 option is removed in the 2.6.32 kernel. 95 option is removed in the 2.6.32 kernel.
92 96
93config DMAR_FLOPPY_WA 97config INTEL_IOMMU_FLOPPY_WA
94 def_bool y 98 def_bool y
95 depends on DMAR && X86 99 depends on INTEL_IOMMU && X86
96 ---help--- 100 ---help---
97 Floppy disk drivers are known to bypass DMA API calls 101 Floppy disk drivers are known to bypass DMA API calls
98 thereby failing to work when IOMMU is enabled. This 102 thereby failing to work when IOMMU is enabled. This
99 workaround will setup a 1:1 mapping for the first 103 workaround will setup a 1:1 mapping for the first
100 16MiB to make floppy (an ISA device) work. 104 16MiB to make floppy (an ISA device) work.
101 105
102config INTR_REMAP 106config IRQ_REMAP
103 bool "Support for Interrupt Remapping (EXPERIMENTAL)" 107 bool "Support for Interrupt Remapping (EXPERIMENTAL)"
104 depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI && EXPERIMENTAL 108 depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI && EXPERIMENTAL
109 select DMAR_TABLE
105 ---help--- 110 ---help---
106 Supports Interrupt remapping for IO-APIC and MSI devices. 111 Supports Interrupt remapping for IO-APIC and MSI devices.
107 To use x2apic mode in the CPU's which support x2APIC enhancements or 112 To use x2apic mode in the CPU's which support x2APIC enhancements or
diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile
index 4d4d77df7cac..6394994a2b9d 100644
--- a/drivers/iommu/Makefile
+++ b/drivers/iommu/Makefile
@@ -1,5 +1,6 @@
1obj-$(CONFIG_IOMMU_API) += iommu.o 1obj-$(CONFIG_IOMMU_API) += iommu.o
2obj-$(CONFIG_MSM_IOMMU) += msm_iommu.o msm_iommu_dev.o 2obj-$(CONFIG_MSM_IOMMU) += msm_iommu.o msm_iommu_dev.o
3obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o amd_iommu_init.o 3obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o amd_iommu_init.o
4obj-$(CONFIG_DMAR) += dmar.o iova.o intel-iommu.o 4obj-$(CONFIG_DMAR_TABLE) += dmar.o
5obj-$(CONFIG_INTR_REMAP) += dmar.o intr_remapping.o 5obj-$(CONFIG_INTEL_IOMMU) += iova.o intel-iommu.o
6obj-$(CONFIG_IRQ_REMAP) += intr_remapping.o
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index e8eb4c5302b0..4e249edd2290 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -393,11 +393,11 @@ static long list_size;
393 393
394static void domain_remove_dev_info(struct dmar_domain *domain); 394static void domain_remove_dev_info(struct dmar_domain *domain);
395 395
396#ifdef CONFIG_DMAR_DEFAULT_ON 396#ifdef CONFIG_INTEL_IOMMU_DEFAULT_ON
397int dmar_disabled = 0; 397int dmar_disabled = 0;
398#else 398#else
399int dmar_disabled = 1; 399int dmar_disabled = 1;
400#endif /*CONFIG_DMAR_DEFAULT_ON*/ 400#endif /*CONFIG_INTEL_IOMMU_DEFAULT_ON*/
401 401
402static int dmar_map_gfx = 1; 402static int dmar_map_gfx = 1;
403static int dmar_forcedac; 403static int dmar_forcedac;
@@ -2150,7 +2150,7 @@ static inline int iommu_prepare_rmrr_dev(struct dmar_rmrr_unit *rmrr,
2150 rmrr->end_address); 2150 rmrr->end_address);
2151} 2151}
2152 2152
2153#ifdef CONFIG_DMAR_FLOPPY_WA 2153#ifdef CONFIG_INTEL_IOMMU_FLOPPY_WA
2154static inline void iommu_prepare_isa(void) 2154static inline void iommu_prepare_isa(void)
2155{ 2155{
2156 struct pci_dev *pdev; 2156 struct pci_dev *pdev;
@@ -2173,7 +2173,7 @@ static inline void iommu_prepare_isa(void)
2173{ 2173{
2174 return; 2174 return;
2175} 2175}
2176#endif /* !CONFIG_DMAR_FLPY_WA */ 2176#endif /* !CONFIG_INTEL_IOMMU_FLPY_WA */
2177 2177
2178static int md_domain_init(struct dmar_domain *domain, int guest_width); 2178static int md_domain_init(struct dmar_domain *domain, int guest_width);
2179 2179
@@ -2484,7 +2484,7 @@ static int __init init_dmars(void)
2484 if (iommu_pass_through) 2484 if (iommu_pass_through)
2485 iommu_identity_mapping |= IDENTMAP_ALL; 2485 iommu_identity_mapping |= IDENTMAP_ALL;
2486 2486
2487#ifdef CONFIG_DMAR_BROKEN_GFX_WA 2487#ifdef CONFIG_INTEL_IOMMU_BROKEN_GFX_WA
2488 iommu_identity_mapping |= IDENTMAP_GFX; 2488 iommu_identity_mapping |= IDENTMAP_GFX;
2489#endif 2489#endif
2490 2490
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 1196f61a4ab6..b23856aaf6eb 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2788,7 +2788,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5CE823, ricoh_
2788DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5CE823, ricoh_mmc_fixup_r5c832); 2788DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5CE823, ricoh_mmc_fixup_r5c832);
2789#endif /*CONFIG_MMC_RICOH_MMC*/ 2789#endif /*CONFIG_MMC_RICOH_MMC*/
2790 2790
2791#if defined(CONFIG_DMAR) || defined(CONFIG_INTR_REMAP) 2791#ifdef CONFIG_DMAR_TABLE
2792#define VTUNCERRMSK_REG 0x1ac 2792#define VTUNCERRMSK_REG 0x1ac
2793#define VTD_MSK_SPEC_ERRORS (1 << 31) 2793#define VTD_MSK_SPEC_ERRORS (1 << 31)
2794/* 2794/*
diff --git a/include/linux/dma_remapping.h b/include/linux/dma_remapping.h
index b98b61b3743e..ef90cbd8e173 100644
--- a/include/linux/dma_remapping.h
+++ b/include/linux/dma_remapping.h
@@ -26,7 +26,7 @@ struct dmar_domain;
26struct root_entry; 26struct root_entry;
27 27
28 28
29#ifdef CONFIG_DMAR 29#ifdef CONFIG_INTEL_IOMMU
30extern void free_dmar_iommu(struct intel_iommu *iommu); 30extern void free_dmar_iommu(struct intel_iommu *iommu);
31extern int iommu_calculate_agaw(struct intel_iommu *iommu); 31extern int iommu_calculate_agaw(struct intel_iommu *iommu);
32extern int iommu_calculate_max_sagaw(struct intel_iommu *iommu); 32extern int iommu_calculate_max_sagaw(struct intel_iommu *iommu);
diff --git a/include/linux/dmar.h b/include/linux/dmar.h
index a7992ec36570..a8b1a847c103 100644
--- a/include/linux/dmar.h
+++ b/include/linux/dmar.h
@@ -31,7 +31,7 @@
31#define DMAR_X2APIC_OPT_OUT 0x2 31#define DMAR_X2APIC_OPT_OUT 0x2
32 32
33struct intel_iommu; 33struct intel_iommu;
34#if defined(CONFIG_DMAR) || defined(CONFIG_INTR_REMAP) 34#ifdef CONFIG_DMAR_TABLE
35extern struct acpi_table_header *dmar_tbl; 35extern struct acpi_table_header *dmar_tbl;
36struct dmar_drhd_unit { 36struct dmar_drhd_unit {
37 struct list_head list; /* list of drhd units */ 37 struct list_head list; /* list of drhd units */
@@ -81,7 +81,7 @@ static inline int enable_drhd_fault_handling(void)
81{ 81{
82 return -1; 82 return -1;
83} 83}
84#endif /* !CONFIG_DMAR && !CONFIG_INTR_REMAP */ 84#endif /* !CONFIG_DMAR_TABLE */
85 85
86struct irte { 86struct irte {
87 union { 87 union {
@@ -112,7 +112,7 @@ struct irte {
112 }; 112 };
113}; 113};
114 114
115#ifdef CONFIG_INTR_REMAP 115#ifdef CONFIG_IRQ_REMAP
116extern int intr_remapping_enabled; 116extern int intr_remapping_enabled;
117extern int intr_remapping_supported(void); 117extern int intr_remapping_supported(void);
118extern int enable_intr_remapping(void); 118extern int enable_intr_remapping(void);
@@ -214,7 +214,7 @@ extern int dmar_set_interrupt(struct intel_iommu *iommu);
214extern irqreturn_t dmar_fault(int irq, void *dev_id); 214extern irqreturn_t dmar_fault(int irq, void *dev_id);
215extern int arch_setup_dmar_msi(unsigned int irq); 215extern int arch_setup_dmar_msi(unsigned int irq);
216 216
217#ifdef CONFIG_DMAR 217#ifdef CONFIG_INTEL_IOMMU
218extern int iommu_detected, no_iommu; 218extern int iommu_detected, no_iommu;
219extern struct list_head dmar_rmrr_units; 219extern struct list_head dmar_rmrr_units;
220struct dmar_rmrr_unit { 220struct dmar_rmrr_unit {
@@ -243,7 +243,7 @@ extern int dmar_parse_one_atsr(struct acpi_dmar_header *header);
243extern int dmar_parse_dev_scope(void *start, void *end, int *cnt, 243extern int dmar_parse_dev_scope(void *start, void *end, int *cnt,
244 struct pci_dev ***devices, u16 segment); 244 struct pci_dev ***devices, u16 segment);
245extern int intel_iommu_init(void); 245extern int intel_iommu_init(void);
246#else /* !CONFIG_DMAR: */ 246#else /* !CONFIG_INTEL_IOMMU: */
247static inline int intel_iommu_init(void) { return -ENODEV; } 247static inline int intel_iommu_init(void) { return -ENODEV; }
248static inline int dmar_parse_one_rmrr(struct acpi_dmar_header *header) 248static inline int dmar_parse_one_rmrr(struct acpi_dmar_header *header)
249{ 249{
@@ -257,6 +257,6 @@ static inline int dmar_parse_rmrr_atsr_dev(void)
257{ 257{
258 return 0; 258 return 0;
259} 259}
260#endif /* CONFIG_DMAR */ 260#endif /* CONFIG_INTEL_IOMMU */
261 261
262#endif /* __DMAR_H__ */ 262#endif /* __DMAR_H__ */
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
index 9310c699a37d..235b8879af45 100644
--- a/include/linux/intel-iommu.h
+++ b/include/linux/intel-iommu.h
@@ -279,7 +279,7 @@ struct q_inval {
279 int free_cnt; 279 int free_cnt;
280}; 280};
281 281
282#ifdef CONFIG_INTR_REMAP 282#ifdef CONFIG_IRQ_REMAP
283/* 1MB - maximum possible interrupt remapping table size */ 283/* 1MB - maximum possible interrupt remapping table size */
284#define INTR_REMAP_PAGE_ORDER 8 284#define INTR_REMAP_PAGE_ORDER 8
285#define INTR_REMAP_TABLE_REG_SIZE 0xf 285#define INTR_REMAP_TABLE_REG_SIZE 0xf
@@ -318,7 +318,7 @@ struct intel_iommu {
318 unsigned int irq; 318 unsigned int irq;
319 unsigned char name[13]; /* Device Name */ 319 unsigned char name[13]; /* Device Name */
320 320
321#ifdef CONFIG_DMAR 321#ifdef CONFIG_INTEL_IOMMU
322 unsigned long *domain_ids; /* bitmap of domains */ 322 unsigned long *domain_ids; /* bitmap of domains */
323 struct dmar_domain **domains; /* ptr to domains */ 323 struct dmar_domain **domains; /* ptr to domains */
324 spinlock_t lock; /* protect context, domain ids */ 324 spinlock_t lock; /* protect context, domain ids */
@@ -329,7 +329,7 @@ struct intel_iommu {
329 struct q_inval *qi; /* Queued invalidation info */ 329 struct q_inval *qi; /* Queued invalidation info */
330 u32 *iommu_state; /* Store iommu states between suspend and resume.*/ 330 u32 *iommu_state; /* Store iommu states between suspend and resume.*/
331 331
332#ifdef CONFIG_INTR_REMAP 332#ifdef CONFIG_IRQ_REMAP
333 struct ir_table *ir_table; /* Interrupt remapping info */ 333 struct ir_table *ir_table; /* Interrupt remapping info */
334#endif 334#endif
335 int node; 335 int node;