diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2011-11-09 06:31:15 -0500 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2011-12-12 09:19:07 -0500 |
commit | e3c495c74bc008a5c3671bf3411bc7f5382fa58f (patch) | |
tree | c0557712e92cbfe7358ede7ad8c79862ae7a538f /drivers/iommu | |
parent | 399be2f51979aaf4e3391d98d11e3aeaac7633a4 (diff) |
iommu/amd: Add driver stub for AMD IOMMUv2 support
Add a Kconfig option for the optional driver. Since it is
optional it can be compiled as a module and will only be
loaded when required by another driver.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/Kconfig | 8 | ||||
-rw-r--r-- | drivers/iommu/Makefile | 1 | ||||
-rw-r--r-- | drivers/iommu/amd_iommu_v2.c | 36 |
3 files changed, 45 insertions, 0 deletions
diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig index 220dfc24b311..e608a36bb0b1 100644 --- a/drivers/iommu/Kconfig +++ b/drivers/iommu/Kconfig | |||
@@ -60,6 +60,14 @@ config AMD_IOMMU_STATS | |||
60 | information to userspace via debugfs. | 60 | information to userspace via debugfs. |
61 | If unsure, say N. | 61 | If unsure, say N. |
62 | 62 | ||
63 | config AMD_IOMMU_V2 | ||
64 | tristate "AMD IOMMU Version 2 driver (EXPERIMENTAL)" | ||
65 | depends on AMD_IOMMU && EXPERIMENTAL | ||
66 | ---help--- | ||
67 | This option enables support for the AMD IOMMUv2 features of the IOMMU | ||
68 | hardware. Select this option if you want to use devices that support | ||
69 | the the PCI PRI and PASID interface. | ||
70 | |||
63 | # Intel IOMMU support | 71 | # Intel IOMMU support |
64 | config DMAR_TABLE | 72 | config DMAR_TABLE |
65 | bool | 73 | bool |
diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile index 2f4448794bc7..0e36b4934aff 100644 --- a/drivers/iommu/Makefile +++ b/drivers/iommu/Makefile | |||
@@ -1,6 +1,7 @@ | |||
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_AMD_IOMMU_V2) += amd_iommu_v2.o | ||
4 | obj-$(CONFIG_DMAR_TABLE) += dmar.o | 5 | obj-$(CONFIG_DMAR_TABLE) += dmar.o |
5 | obj-$(CONFIG_INTEL_IOMMU) += iova.o intel-iommu.o | 6 | obj-$(CONFIG_INTEL_IOMMU) += iova.o intel-iommu.o |
6 | obj-$(CONFIG_IRQ_REMAP) += intr_remapping.o | 7 | obj-$(CONFIG_IRQ_REMAP) += intr_remapping.o |
diff --git a/drivers/iommu/amd_iommu_v2.c b/drivers/iommu/amd_iommu_v2.c new file mode 100644 index 000000000000..a19e07d11d12 --- /dev/null +++ b/drivers/iommu/amd_iommu_v2.c | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010-2012 Advanced Micro Devices, Inc. | ||
3 | * Author: Joerg Roedel <joerg.roedel@amd.com> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms of the GNU General Public License version 2 as published | ||
7 | * by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
18 | |||
19 | #include <linux/module.h> | ||
20 | |||
21 | MODULE_LICENSE("GPL v2"); | ||
22 | MODULE_AUTHOR("Joerg Roedel <joerg.roedel@amd.com>"); | ||
23 | |||
24 | static int __init amd_iommu_v2_init(void) | ||
25 | { | ||
26 | pr_info("AMD IOMMUv2 driver by Joerg Roedel <joerg.roedel@amd.com>"); | ||
27 | |||
28 | return 0; | ||
29 | } | ||
30 | |||
31 | static void __exit amd_iommu_v2_exit(void) | ||
32 | { | ||
33 | } | ||
34 | |||
35 | module_init(amd_iommu_v2_init); | ||
36 | module_exit(amd_iommu_v2_exit); | ||