Skip to content

Commit 29b6841

Browse files
ohadbcjoergroedel
authored andcommitted
x86: amd_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. Compile-tested on x86_64. Signed-off-by: Ohad Ben-Cohen <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
1 parent b10f127 commit 29b6841

File tree

5 files changed

+31
-29
lines changed

5 files changed

+31
-29
lines changed

arch/x86/Kconfig

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -680,34 +680,6 @@ config CALGARY_IOMMU_ENABLED_BY_DEFAULT
680680
Calgary anyway, pass 'iommu=calgary' on the kernel command line.
681681
If unsure, say Y.
682682

683-
config AMD_IOMMU
684-
bool "AMD IOMMU support"
685-
select SWIOTLB
686-
select PCI_MSI
687-
select PCI_IOV
688-
select IOMMU_API
689-
depends on X86_64 && PCI && ACPI
690-
---help---
691-
With this option you can enable support for AMD IOMMU hardware in
692-
your system. An IOMMU is a hardware component which provides
693-
remapping of DMA memory accesses from devices. With an AMD IOMMU you
694-
can isolate the the DMA memory of different devices and protect the
695-
system from misbehaving device drivers or hardware.
696-
697-
You can find out if your system has an AMD IOMMU if you look into
698-
your BIOS for an option to enable it or if you have an IVRS ACPI
699-
table.
700-
701-
config AMD_IOMMU_STATS
702-
bool "Export AMD IOMMU statistics to debugfs"
703-
depends on AMD_IOMMU
704-
select DEBUG_FS
705-
---help---
706-
This option enables code in the AMD IOMMU driver to collect various
707-
statistics about whats happening in the driver and exports that
708-
information to userspace via debugfs.
709-
If unsure, say N.
710-
711683
# need this always selected by IOMMU for the VIA workaround
712684
config SWIOTLB
713685
def_bool y if X86_64

arch/x86/kernel/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ ifeq ($(CONFIG_X86_64),y)
123123

124124
obj-$(CONFIG_GART_IOMMU) += amd_gart_64.o aperture_64.o
125125
obj-$(CONFIG_CALGARY_IOMMU) += pci-calgary_64.o tce_64.o
126-
obj-$(CONFIG_AMD_IOMMU) += amd_iommu_init.o amd_iommu.o
126+
obj-$(CONFIG_AMD_IOMMU) += amd_iommu_init.o
127127

128128
obj-$(CONFIG_PCI_MMCONFIG) += mmconf-fam10h_64.o
129129
obj-y += vsmp_64.o

drivers/iommu/Kconfig

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,32 @@ config MSM_IOMMU
1717
config IOMMU_PGTABLES_L2
1818
def_bool y
1919
depends on MSM_IOMMU && MMU && SMP && CPU_DCACHE_DISABLE=n
20+
21+
# AMD IOMMU support
22+
config AMD_IOMMU
23+
bool "AMD IOMMU support"
24+
select SWIOTLB
25+
select PCI_MSI
26+
select PCI_IOV
27+
select IOMMU_API
28+
depends on X86_64 && PCI && ACPI
29+
---help---
30+
With this option you can enable support for AMD IOMMU hardware in
31+
your system. An IOMMU is a hardware component which provides
32+
remapping of DMA memory accesses from devices. With an AMD IOMMU you
33+
can isolate the the DMA memory of different devices and protect the
34+
system from misbehaving device drivers or hardware.
35+
36+
You can find out if your system has an AMD IOMMU if you look into
37+
your BIOS for an option to enable it or if you have an IVRS ACPI
38+
table.
39+
40+
config AMD_IOMMU_STATS
41+
bool "Export AMD IOMMU statistics to debugfs"
42+
depends on AMD_IOMMU
43+
select DEBUG_FS
44+
---help---
45+
This option enables code in the AMD IOMMU driver to collect various
46+
statistics about whats happening in the driver and exports that
47+
information to userspace via debugfs.
48+
If unsure, say N.

drivers/iommu/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
obj-$(CONFIG_IOMMU_API) += iommu.o
22
obj-$(CONFIG_MSM_IOMMU) += msm_iommu.o msm_iommu_dev.o
3+
obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o
File renamed without changes.

0 commit comments

Comments
 (0)