diff options
author | Suresh Siddha <suresh.b.siddha@intel.com> | 2011-08-23 20:05:25 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-09-21 04:22:03 -0400 |
commit | d3f138106b4b40640dc667f0222fd9f137387b32 (patch) | |
tree | 2c5d51deff32ec0999493bbb73cb18a7e4a455c3 /drivers/iommu | |
parent | c39d77ffa28c6e72702193df4fa53928c1b6f3e6 (diff) |
iommu: Rename the DMAR and INTR_REMAP config options
Change the CONFIG_DMAR to CONFIG_INTEL_IOMMU to be consistent
with the other IOMMU options.
Rename the CONFIG_INTR_REMAP to CONFIG_IRQ_REMAP to match the
irq subsystem name.
And define the CONFIG_DMAR_TABLE for the common ACPI DMAR
routines shared by both CONFIG_INTEL_IOMMU and CONFIG_IRQ_REMAP.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: yinghai@kernel.org
Cc: youquan.song@intel.com
Cc: joerg.roedel@amd.com
Cc: tony.luck@intel.com
Cc: dwmw2@infradead.org
Link: http://lkml.kernel.org/r/20110824001456.558630224@sbsiddha-desk.sc.intel.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/Kconfig | 25 | ||||
-rw-r--r-- | drivers/iommu/Makefile | 5 | ||||
-rw-r--r-- | drivers/iommu/intel-iommu.c | 10 |
3 files changed, 23 insertions, 17 deletions
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 |
62 | config DMAR | 62 | config DMAR_TABLE |
63 | bool "Support for DMA Remapping Devices" | 63 | bool |
64 | |||
65 | config 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 | ||
73 | config DMAR_DEFAULT_ON | 77 | config 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 | ||
82 | config DMAR_BROKEN_GFX_WA | 86 | config 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 | ||
93 | config DMAR_FLOPPY_WA | 97 | config 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 | ||
102 | config INTR_REMAP | 106 | config 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 @@ | |||
1 | obj-$(CONFIG_IOMMU_API) += iommu.o | 1 | obj-$(CONFIG_IOMMU_API) += iommu.o |
2 | obj-$(CONFIG_MSM_IOMMU) += msm_iommu.o msm_iommu_dev.o | 2 | obj-$(CONFIG_MSM_IOMMU) += msm_iommu.o msm_iommu_dev.o |
3 | obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o amd_iommu_init.o | 3 | obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o amd_iommu_init.o |
4 | obj-$(CONFIG_DMAR) += dmar.o iova.o intel-iommu.o | 4 | obj-$(CONFIG_DMAR_TABLE) += dmar.o |
5 | obj-$(CONFIG_INTR_REMAP) += dmar.o intr_remapping.o | 5 | obj-$(CONFIG_INTEL_IOMMU) += iova.o intel-iommu.o |
6 | obj-$(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 | ||
394 | static void domain_remove_dev_info(struct dmar_domain *domain); | 394 | static void domain_remove_dev_info(struct dmar_domain *domain); |
395 | 395 | ||
396 | #ifdef CONFIG_DMAR_DEFAULT_ON | 396 | #ifdef CONFIG_INTEL_IOMMU_DEFAULT_ON |
397 | int dmar_disabled = 0; | 397 | int dmar_disabled = 0; |
398 | #else | 398 | #else |
399 | int dmar_disabled = 1; | 399 | int dmar_disabled = 1; |
400 | #endif /*CONFIG_DMAR_DEFAULT_ON*/ | 400 | #endif /*CONFIG_INTEL_IOMMU_DEFAULT_ON*/ |
401 | 401 | ||
402 | static int dmar_map_gfx = 1; | 402 | static int dmar_map_gfx = 1; |
403 | static int dmar_forcedac; | 403 | static 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 |
2154 | static inline void iommu_prepare_isa(void) | 2154 | static 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 | ||
2178 | static int md_domain_init(struct dmar_domain *domain, int guest_width); | 2178 | static 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 | ||