Skip to content

Commit cbe94c6

Browse files
snitsjoergroedel
authored andcommitted
iommu/amd: Move Kconfig and Makefile bits down into amd directory
Move AMD Kconfig and Makefile bits down into the amd directory with the rest of the AMD specific files. Signed-off-by: Jerry Snitselaar <[email protected]> Cc: Joerg Roedel <[email protected]> Cc: Suravee Suthikulpanit <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent ab65ba5 commit cbe94c6

File tree

4 files changed

+50
-48
lines changed

4 files changed

+50
-48
lines changed

drivers/iommu/Kconfig

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -128,50 +128,7 @@ config MSM_IOMMU
128128

129129
If unsure, say N here.
130130

131-
# AMD IOMMU support
132-
config AMD_IOMMU
133-
bool "AMD IOMMU support"
134-
select SWIOTLB
135-
select PCI_MSI
136-
select PCI_ATS
137-
select PCI_PRI
138-
select PCI_PASID
139-
select IOMMU_API
140-
select IOMMU_IOVA
141-
select IOMMU_DMA
142-
depends on X86_64 && PCI && ACPI
143-
help
144-
With this option you can enable support for AMD IOMMU hardware in
145-
your system. An IOMMU is a hardware component which provides
146-
remapping of DMA memory accesses from devices. With an AMD IOMMU you
147-
can isolate the DMA memory of different devices and protect the
148-
system from misbehaving device drivers or hardware.
149-
150-
You can find out if your system has an AMD IOMMU if you look into
151-
your BIOS for an option to enable it or if you have an IVRS ACPI
152-
table.
153-
154-
config AMD_IOMMU_V2
155-
tristate "AMD IOMMU Version 2 driver"
156-
depends on AMD_IOMMU
157-
select MMU_NOTIFIER
158-
help
159-
This option enables support for the AMD IOMMUv2 features of the IOMMU
160-
hardware. Select this option if you want to use devices that support
161-
the PCI PRI and PASID interface.
162-
163-
config AMD_IOMMU_DEBUGFS
164-
bool "Enable AMD IOMMU internals in DebugFS"
165-
depends on AMD_IOMMU && IOMMU_DEBUGFS
166-
help
167-
!!!WARNING!!! !!!WARNING!!! !!!WARNING!!! !!!WARNING!!!
168-
169-
DO NOT ENABLE THIS OPTION UNLESS YOU REALLY, -REALLY- KNOW WHAT YOU ARE DOING!!!
170-
Exposes AMD IOMMU device internals in DebugFS.
171-
172-
This option is -NOT- intended for production environments, and should
173-
not generally be enabled.
174-
131+
source "drivers/iommu/amd/Kconfig"
175132
source "drivers/iommu/intel/Kconfig"
176133

177134
config IRQ_REMAP

drivers/iommu/Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-License-Identifier: GPL-2.0
2-
obj-y += intel/
2+
obj-y += amd/ intel/
33
obj-$(CONFIG_IOMMU_API) += iommu.o
44
obj-$(CONFIG_IOMMU_API) += iommu-traces.o
55
obj-$(CONFIG_IOMMU_API) += iommu-sysfs.o
@@ -12,9 +12,6 @@ obj-$(CONFIG_IOASID) += ioasid.o
1212
obj-$(CONFIG_IOMMU_IOVA) += iova.o
1313
obj-$(CONFIG_OF_IOMMU) += of_iommu.o
1414
obj-$(CONFIG_MSM_IOMMU) += msm_iommu.o
15-
obj-$(CONFIG_AMD_IOMMU) += amd/iommu.o amd/init.o amd/quirks.o
16-
obj-$(CONFIG_AMD_IOMMU_DEBUGFS) += amd/debugfs.o
17-
obj-$(CONFIG_AMD_IOMMU_V2) += amd/iommu_v2.o
1815
obj-$(CONFIG_ARM_SMMU) += arm_smmu.o
1916
arm_smmu-objs += arm-smmu.o arm-smmu-impl.o arm-smmu-qcom.o
2017
obj-$(CONFIG_ARM_SMMU_V3) += arm-smmu-v3.o

drivers/iommu/amd/Kconfig

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
# AMD IOMMU support
3+
config AMD_IOMMU
4+
bool "AMD IOMMU support"
5+
select SWIOTLB
6+
select PCI_MSI
7+
select PCI_ATS
8+
select PCI_PRI
9+
select PCI_PASID
10+
select IOMMU_API
11+
select IOMMU_IOVA
12+
select IOMMU_DMA
13+
depends on X86_64 && PCI && ACPI
14+
help
15+
With this option you can enable support for AMD IOMMU hardware in
16+
your system. An IOMMU is a hardware component which provides
17+
remapping of DMA memory accesses from devices. With an AMD IOMMU you
18+
can isolate the DMA memory of different devices and protect the
19+
system from misbehaving device drivers or hardware.
20+
21+
You can find out if your system has an AMD IOMMU if you look into
22+
your BIOS for an option to enable it or if you have an IVRS ACPI
23+
table.
24+
25+
config AMD_IOMMU_V2
26+
tristate "AMD IOMMU Version 2 driver"
27+
depends on AMD_IOMMU
28+
select MMU_NOTIFIER
29+
help
30+
This option enables support for the AMD IOMMUv2 features of the IOMMU
31+
hardware. Select this option if you want to use devices that support
32+
the PCI PRI and PASID interface.
33+
34+
config AMD_IOMMU_DEBUGFS
35+
bool "Enable AMD IOMMU internals in DebugFS"
36+
depends on AMD_IOMMU && IOMMU_DEBUGFS
37+
help
38+
!!!WARNING!!! !!!WARNING!!! !!!WARNING!!! !!!WARNING!!!
39+
40+
DO NOT ENABLE THIS OPTION UNLESS YOU REALLY, -REALLY- KNOW WHAT YOU ARE DOING!!!
41+
Exposes AMD IOMMU device internals in DebugFS.
42+
43+
This option is -NOT- intended for production environments, and should
44+
not generally be enabled.

drivers/iommu/amd/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
obj-$(CONFIG_AMD_IOMMU) += iommu.o init.o quirks.o
3+
obj-$(CONFIG_AMD_IOMMU_DEBUGFS) += debugfs.o
4+
obj-$(CONFIG_AMD_IOMMU_V2) += iommu_v2.o

0 commit comments

Comments
 (0)