aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorOhad Ben-Cohen <ohad@wizery.com>2011-06-10 14:42:27 -0400
committerJoerg Roedel <joerg.roedel@amd.com>2011-06-21 04:49:30 -0400
commit166e9278a3f98bab29ebb3d685a81cfb11b98be0 (patch)
treef8f3e8a28c5d96d9053567d6a9ef8e04e7b298dd /drivers
parent29b68415e335ba9e0eb6057f9405aa4d9c23efe4 (diff)
x86/ia64: intel-iommu: move to drivers/iommu/
This should ease finding similarities with different platforms, with the intention of solving problems once in a generic framework which everyone can use. Note: to move intel-iommu.c, the declaration of pci_find_upstream_pcie_bridge() has to move from drivers/pci/pci.h to include/linux/pci.h. This is handled in this patch, too. As suggested, also drop DMAR's EXPERIMENTAL tag while we're at it. Compile-tested on x86_64. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iommu/Kconfig49
-rw-r--r--drivers/iommu/Makefile2
-rw-r--r--drivers/iommu/dmar.c (renamed from drivers/pci/dmar.c)0
-rw-r--r--drivers/iommu/intel-iommu.c (renamed from drivers/pci/intel-iommu.c)1
-rw-r--r--drivers/iommu/intr_remapping.c (renamed from drivers/pci/intr_remapping.c)1
-rw-r--r--drivers/iommu/intr_remapping.h (renamed from drivers/pci/intr_remapping.h)0
-rw-r--r--drivers/iommu/iova.c (renamed from drivers/pci/iova.c)0
-rw-r--r--drivers/pci/Makefile5
-rw-r--r--drivers/pci/pci.h2
9 files changed, 51 insertions, 9 deletions
diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index 9246c5bf25a..e2a5f141ae2 100644
--- a/drivers/iommu/Kconfig
+++ b/drivers/iommu/Kconfig
@@ -46,3 +46,52 @@ config AMD_IOMMU_STATS
46 statistics about whats happening in the driver and exports that 46 statistics about whats happening in the driver and exports that
47 information to userspace via debugfs. 47 information to userspace via debugfs.
48 If unsure, say N. 48 If unsure, say N.
49
50# Intel IOMMU support
51config DMAR
52 bool "Support for DMA Remapping Devices"
53 depends on PCI_MSI && ACPI && (X86 || IA64_GENERIC)
54 select IOMMU_API
55 help
56 DMA remapping (DMAR) devices support enables independent address
57 translations for Direct Memory Access (DMA) from devices.
58 These DMA remapping devices are reported via ACPI tables
59 and include PCI device scope covered by these DMA
60 remapping devices.
61
62config DMAR_DEFAULT_ON
63 def_bool y
64 prompt "Enable DMA Remapping Devices by default"
65 depends on DMAR
66 help
67 Selecting this option will enable a DMAR device at boot time if
68 one is found. If this option is not selected, DMAR support can
69 be enabled by passing intel_iommu=on to the kernel.
70
71config DMAR_BROKEN_GFX_WA
72 bool "Workaround broken graphics drivers (going away soon)"
73 depends on DMAR && BROKEN && X86
74 ---help---
75 Current Graphics drivers tend to use physical address
76 for DMA and avoid using DMA APIs. Setting this config
77 option permits the IOMMU driver to set a unity map for
78 all the OS-visible memory. Hence the driver can continue
79 to use physical addresses for DMA, at least until this
80 option is removed in the 2.6.32 kernel.
81
82config DMAR_FLOPPY_WA
83 def_bool y
84 depends on DMAR && X86
85 ---help---
86 Floppy disk drivers are known to bypass DMA API calls
87 thereby failing to work when IOMMU is enabled. This
88 workaround will setup a 1:1 mapping for the first
89 16MiB to make floppy (an ISA device) work.
90
91config INTR_REMAP
92 bool "Support for Interrupt Remapping (EXPERIMENTAL)"
93 depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI && EXPERIMENTAL
94 ---help---
95 Supports Interrupt remapping for IO-APIC and MSI devices.
96 To use x2apic mode in the CPU's which support x2APIC enhancements or
97 to support platforms with CPU's having > 8 bit APIC ID, say Y.
diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile
index 4237eaf8460..49e9c0f46bd 100644
--- a/drivers/iommu/Makefile
+++ b/drivers/iommu/Makefile
@@ -1,3 +1,5 @@
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 3obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o
4obj-$(CONFIG_DMAR) += dmar.o iova.o intel-iommu.o
5obj-$(CONFIG_INTR_REMAP) += dmar.o intr_remapping.o
diff --git a/drivers/pci/dmar.c b/drivers/iommu/dmar.c
index 3dc9befa5ae..3dc9befa5ae 100644
--- a/drivers/pci/dmar.c
+++ b/drivers/iommu/dmar.c
diff --git a/drivers/pci/intel-iommu.c b/drivers/iommu/intel-iommu.c
index f02c34d26d1..c621c98c99d 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -42,7 +42,6 @@
42#include <linux/pci-ats.h> 42#include <linux/pci-ats.h>
43#include <asm/cacheflush.h> 43#include <asm/cacheflush.h>
44#include <asm/iommu.h> 44#include <asm/iommu.h>
45#include "pci.h"
46 45
47#define ROOT_SIZE VTD_PAGE_SIZE 46#define ROOT_SIZE VTD_PAGE_SIZE
48#define CONTEXT_SIZE VTD_PAGE_SIZE 47#define CONTEXT_SIZE VTD_PAGE_SIZE
diff --git a/drivers/pci/intr_remapping.c b/drivers/iommu/intr_remapping.c
index 3607faf28a4..1a89d4a2cad 100644
--- a/drivers/pci/intr_remapping.c
+++ b/drivers/iommu/intr_remapping.c
@@ -13,7 +13,6 @@
13#include "intr_remapping.h" 13#include "intr_remapping.h"
14#include <acpi/acpi.h> 14#include <acpi/acpi.h>
15#include <asm/pci-direct.h> 15#include <asm/pci-direct.h>
16#include "pci.h"
17 16
18static struct ioapic_scope ir_ioapic[MAX_IO_APICS]; 17static struct ioapic_scope ir_ioapic[MAX_IO_APICS];
19static struct hpet_scope ir_hpet[MAX_HPET_TBS]; 18static struct hpet_scope ir_hpet[MAX_HPET_TBS];
diff --git a/drivers/pci/intr_remapping.h b/drivers/iommu/intr_remapping.h
index 5662fecfee6..5662fecfee6 100644
--- a/drivers/pci/intr_remapping.h
+++ b/drivers/iommu/intr_remapping.h
diff --git a/drivers/pci/iova.c b/drivers/iommu/iova.c
index c5c274ab5c5..c5c274ab5c5 100644
--- a/drivers/pci/iova.c
+++ b/drivers/iommu/iova.c
diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile
index 094308e41be..825c02b40da 100644
--- a/drivers/pci/Makefile
+++ b/drivers/pci/Makefile
@@ -29,11 +29,6 @@ obj-$(CONFIG_PCI_MSI) += msi.o
29# Build the Hypertransport interrupt support 29# Build the Hypertransport interrupt support
30obj-$(CONFIG_HT_IRQ) += htirq.o 30obj-$(CONFIG_HT_IRQ) += htirq.o
31 31
32# Build Intel IOMMU support
33obj-$(CONFIG_DMAR) += dmar.o iova.o intel-iommu.o
34
35obj-$(CONFIG_INTR_REMAP) += dmar.o intr_remapping.o
36
37obj-$(CONFIG_PCI_IOV) += iov.o 32obj-$(CONFIG_PCI_IOV) += iov.o
38 33
39# 34#
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index 731e20265ac..b7bf11dd546 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -184,8 +184,6 @@ pci_match_one_device(const struct pci_device_id *id, const struct pci_dev *dev)
184 return NULL; 184 return NULL;
185} 185}
186 186
187struct pci_dev *pci_find_upstream_pcie_bridge(struct pci_dev *pdev);
188
189/* PCI slot sysfs helper code */ 187/* PCI slot sysfs helper code */
190#define to_pci_slot(s) container_of(s, struct pci_slot, kobj) 188#define to_pci_slot(s) container_of(s, struct pci_slot, kobj)
191 189