aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/ia64/Kconfig21
-rw-r--r--arch/x86/Kconfig50
-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
-rw-r--r--include/linux/pci.h11
12 files changed, 62 insertions, 80 deletions
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 9929e4e11ea..7336ba653b8 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -627,27 +627,6 @@ source "drivers/pci/hotplug/Kconfig"
627 627
628source "drivers/pcmcia/Kconfig" 628source "drivers/pcmcia/Kconfig"
629 629
630config DMAR
631 bool "Support for DMA Remapping Devices (EXPERIMENTAL)"
632 depends on IA64_GENERIC && ACPI && EXPERIMENTAL
633 help
634 DMA remapping (DMAR) devices support enables independent address
635 translations for Direct Memory Access (DMA) from devices.
636 These DMA remapping devices are reported via ACPI tables
637 and include PCI device scope covered by these DMA
638 remapping devices.
639
640config DMAR_DEFAULT_ON
641 def_bool y
642 prompt "Enable DMA Remapping Devices by default"
643 depends on DMAR
644 help
645 Selecting this option will enable a DMAR device at boot time if
646 one is found. If this option is not selected, DMAR support can
647 be enabled by passing intel_iommu=on to the kernel. It is
648 recommended you say N here while the DMAR code remains
649 experimental.
650
651endmenu 630endmenu
652 631
653endif 632endif
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 1b6a2e212db..a169573c64f 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1912,56 +1912,6 @@ config PCI_CNB20LE_QUIRK
1912 1912
1913 You should say N unless you know you need this. 1913 You should say N unless you know you need this.
1914 1914
1915config DMAR
1916 bool "Support for DMA Remapping Devices (EXPERIMENTAL)"
1917 depends on PCI_MSI && ACPI && EXPERIMENTAL
1918 select IOMMU_API
1919 help
1920 DMA remapping (DMAR) devices support enables independent address
1921 translations for Direct Memory Access (DMA) from devices.
1922 These DMA remapping devices are reported via ACPI tables
1923 and include PCI device scope covered by these DMA
1924 remapping devices.
1925
1926config DMAR_DEFAULT_ON
1927 def_bool y
1928 prompt "Enable DMA Remapping Devices by default"
1929 depends on DMAR
1930 help
1931 Selecting this option will enable a DMAR device at boot time if
1932 one is found. If this option is not selected, DMAR support can
1933 be enabled by passing intel_iommu=on to the kernel. It is
1934 recommended you say N here while the DMAR code remains
1935 experimental.
1936
1937config DMAR_BROKEN_GFX_WA
1938 bool "Workaround broken graphics drivers (going away soon)"
1939 depends on DMAR && BROKEN
1940 ---help---
1941 Current Graphics drivers tend to use physical address
1942 for DMA and avoid using DMA APIs. Setting this config
1943 option permits the IOMMU driver to set a unity map for
1944 all the OS-visible memory. Hence the driver can continue
1945 to use physical addresses for DMA, at least until this
1946 option is removed in the 2.6.32 kernel.
1947
1948config DMAR_FLOPPY_WA
1949 def_bool y
1950 depends on DMAR
1951 ---help---
1952 Floppy disk drivers are known to bypass DMA API calls
1953 thereby failing to work when IOMMU is enabled. This
1954 workaround will setup a 1:1 mapping for the first
1955 16MiB to make floppy (an ISA device) work.
1956
1957config INTR_REMAP
1958 bool "Support for Interrupt Remapping (EXPERIMENTAL)"
1959 depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI && EXPERIMENTAL
1960 ---help---
1961 Supports Interrupt remapping for IO-APIC and MSI devices.
1962 To use x2apic mode in the CPU's which support x2APIC enhancements or
1963 to support platforms with CPU's having > 8 bit APIC ID, say Y.
1964
1965source "drivers/pci/pcie/Kconfig" 1915source "drivers/pci/pcie/Kconfig"
1966 1916
1967source "drivers/pci/Kconfig" 1917source "drivers/pci/Kconfig"
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
diff --git a/include/linux/pci.h b/include/linux/pci.h
index c446b5ca2d3..970bfe0941c 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1589,5 +1589,16 @@ int pci_vpd_find_tag(const u8 *buf, unsigned int off, unsigned int len, u8 rdt);
1589int pci_vpd_find_info_keyword(const u8 *buf, unsigned int off, 1589int pci_vpd_find_info_keyword(const u8 *buf, unsigned int off,
1590 unsigned int len, const char *kw); 1590 unsigned int len, const char *kw);
1591 1591
1592/**
1593 * pci_find_upstream_pcie_bridge - find upstream PCIe-to-PCI bridge of a device
1594 * @pdev: the PCI device
1595 *
1596 * if the device is PCIE, return NULL
1597 * if the device isn't connected to a PCIe bridge (that is its parent is a
1598 * legacy PCI bridge and the bridge is directly connected to bus 0), return its
1599 * parent
1600 */
1601struct pci_dev *pci_find_upstream_pcie_bridge(struct pci_dev *pdev);
1602
1592#endif /* __KERNEL__ */ 1603#endif /* __KERNEL__ */
1593#endif /* LINUX_PCI_H */ 1604#endif /* LINUX_PCI_H */