aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuslan Bukin <br@FreeBSD.org>2020-07-21 10:38:51 +0000
committerRuslan Bukin <br@FreeBSD.org>2020-07-21 10:38:51 +0000
commitf2b2f31707bce25e3fdee9fdfcb75ddbd1ff3338 (patch)
tree1fa2c6551127addadaf41b689e81ababfec3e335
parent2032c532aad7def4246282ff51cc36ac6f2c5db0 (diff)
downloadsrc-f2b2f31707bce25e3fdee9fdfcb75ddbd1ff3338.tar.gz
src-f2b2f31707bce25e3fdee9fdfcb75ddbd1ff3338.zip
Move the Intel DMAR busdma backend to a generic place so
it can be used on other IOMMU systems. Reviewed by: kib Sponsored by: DARPA/AFRL Differential Revision: https://reviews.freebsd.org/D25720
Notes
Notes: svn path=/head/; revision=363387
-rw-r--r--sys/conf/files.x862
-rw-r--r--sys/dev/iommu/busdma_iommu.c (renamed from sys/x86/iommu/busdma_dmar.c)6
-rw-r--r--sys/dev/iommu/busdma_iommu.h (renamed from sys/x86/iommu/busdma_dmar.h)0
-rw-r--r--sys/x86/iommu/intel_ctx.c2
-rw-r--r--sys/x86/iommu/intel_drv.c2
-rw-r--r--sys/x86/iommu/intel_fault.c2
-rw-r--r--sys/x86/iommu/intel_gas.c2
-rw-r--r--sys/x86/iommu/intel_idpgtbl.c2
-rw-r--r--sys/x86/iommu/intel_intrmap.c2
-rw-r--r--sys/x86/iommu/intel_qi.c2
-rw-r--r--sys/x86/iommu/intel_quirks.c2
-rw-r--r--sys/x86/iommu/intel_utils.c2
12 files changed, 13 insertions, 13 deletions
diff --git a/sys/conf/files.x86 b/sys/conf/files.x86
index 08ab90d0f8f6..b5f68041246d 100644
--- a/sys/conf/files.x86
+++ b/sys/conf/files.x86
@@ -165,6 +165,7 @@ dev/imcsmb/imcsmb.c optional imcsmb
dev/imcsmb/imcsmb_pci.c optional imcsmb pci
dev/intel/spi.c optional intelspi
dev/io/iodev.c optional io
+dev/iommu/busdma_iommu.c optional acpi acpi_dmar pci
dev/ipmi/ipmi.c optional ipmi
dev/ipmi/ipmi_acpi.c optional ipmi acpi
dev/ipmi/ipmi_isa.c optional ipmi isa
@@ -300,7 +301,6 @@ x86/cpufreq/hwpstate_amd.c optional cpufreq
x86/cpufreq/hwpstate_intel.c optional cpufreq
x86/cpufreq/p4tcc.c optional cpufreq
x86/cpufreq/powernow.c optional cpufreq
-x86/iommu/busdma_dmar.c optional acpi acpi_dmar pci
x86/iommu/intel_ctx.c optional acpi acpi_dmar pci
x86/iommu/intel_drv.c optional acpi acpi_dmar pci
x86/iommu/intel_fault.c optional acpi acpi_dmar pci
diff --git a/sys/x86/iommu/busdma_dmar.c b/sys/dev/iommu/busdma_iommu.c
index 6b9d3be49b1b..02da3acf5e9e 100644
--- a/sys/x86/iommu/busdma_dmar.c
+++ b/sys/dev/iommu/busdma_iommu.c
@@ -67,13 +67,13 @@ __FBSDID("$FreeBSD$");
#include <machine/specialreg.h>
#include <x86/include/busdma_impl.h>
#include <x86/iommu/intel_reg.h>
-#include <x86/iommu/busdma_dmar.h>
+#include <dev/iommu/busdma_iommu.h>
#include <x86/iommu/intel_dmar.h>
#endif
/*
- * busdma_dmar.c, the implementation of the busdma(9) interface using
- * DMAR units from Intel VT-d.
+ * busdma_iommu.c, the implementation of the busdma(9) interface using
+ * IOMMU units from Intel VT-d.
*/
static bool
diff --git a/sys/x86/iommu/busdma_dmar.h b/sys/dev/iommu/busdma_iommu.h
index 22575a6cb35a..22575a6cb35a 100644
--- a/sys/x86/iommu/busdma_dmar.h
+++ b/sys/dev/iommu/busdma_iommu.h
diff --git a/sys/x86/iommu/intel_ctx.c b/sys/x86/iommu/intel_ctx.c
index 92ee9676af98..dd551c2f56d3 100644
--- a/sys/x86/iommu/intel_ctx.c
+++ b/sys/x86/iommu/intel_ctx.c
@@ -66,7 +66,7 @@ __FBSDID("$FreeBSD$");
#include <contrib/dev/acpica/include/accommon.h>
#include <x86/include/busdma_impl.h>
#include <x86/iommu/intel_reg.h>
-#include <x86/iommu/busdma_dmar.h>
+#include <dev/iommu/busdma_iommu.h>
#include <dev/pci/pcireg.h>
#include <x86/iommu/intel_dmar.h>
#include <dev/pci/pcivar.h>
diff --git a/sys/x86/iommu/intel_drv.c b/sys/x86/iommu/intel_drv.c
index 6f1771fd9090..90cc923180fa 100644
--- a/sys/x86/iommu/intel_drv.c
+++ b/sys/x86/iommu/intel_drv.c
@@ -68,7 +68,7 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_map.h>
#include <x86/include/busdma_impl.h>
#include <x86/iommu/intel_reg.h>
-#include <x86/iommu/busdma_dmar.h>
+#include <dev/iommu/busdma_iommu.h>
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
#include <x86/iommu/intel_dmar.h>
diff --git a/sys/x86/iommu/intel_fault.c b/sys/x86/iommu/intel_fault.c
index 281f6d2f5146..628bcf2ee763 100644
--- a/sys/x86/iommu/intel_fault.c
+++ b/sys/x86/iommu/intel_fault.c
@@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_map.h>
#include <x86/include/busdma_impl.h>
#include <x86/iommu/intel_reg.h>
-#include <x86/iommu/busdma_dmar.h>
+#include <dev/iommu/busdma_iommu.h>
#include <x86/iommu/intel_dmar.h>
/*
diff --git a/sys/x86/iommu/intel_gas.c b/sys/x86/iommu/intel_gas.c
index 2ddddf77ad59..9df0da9242b2 100644
--- a/sys/x86/iommu/intel_gas.c
+++ b/sys/x86/iommu/intel_gas.c
@@ -66,7 +66,7 @@ __FBSDID("$FreeBSD$");
#include <machine/specialreg.h>
#include <x86/include/busdma_impl.h>
#include <x86/iommu/intel_reg.h>
-#include <x86/iommu/busdma_dmar.h>
+#include <dev/iommu/busdma_iommu.h>
#include <dev/pci/pcireg.h>
#include <x86/iommu/intel_dmar.h>
diff --git a/sys/x86/iommu/intel_idpgtbl.c b/sys/x86/iommu/intel_idpgtbl.c
index fc99f058a1fe..2febb55f9426 100644
--- a/sys/x86/iommu/intel_idpgtbl.c
+++ b/sys/x86/iommu/intel_idpgtbl.c
@@ -65,7 +65,7 @@ __FBSDID("$FreeBSD$");
#include <machine/specialreg.h>
#include <x86/include/busdma_impl.h>
#include <x86/iommu/intel_reg.h>
-#include <x86/iommu/busdma_dmar.h>
+#include <dev/iommu/busdma_iommu.h>
#include <dev/pci/pcireg.h>
#include <x86/iommu/intel_dmar.h>
diff --git a/sys/x86/iommu/intel_intrmap.c b/sys/x86/iommu/intel_intrmap.c
index 2dbd2d15704d..d2bce59c4c2e 100644
--- a/sys/x86/iommu/intel_intrmap.c
+++ b/sys/x86/iommu/intel_intrmap.c
@@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$");
#include <x86/include/apicvar.h>
#include <x86/include/busdma_impl.h>
#include <x86/iommu/intel_reg.h>
-#include <x86/iommu/busdma_dmar.h>
+#include <dev/iommu/busdma_iommu.h>
#include <dev/pci/pcireg.h>
#include <x86/iommu/intel_dmar.h>
#include <dev/pci/pcivar.h>
diff --git a/sys/x86/iommu/intel_qi.c b/sys/x86/iommu/intel_qi.c
index 564a87f21db0..5377ac448df8 100644
--- a/sys/x86/iommu/intel_qi.c
+++ b/sys/x86/iommu/intel_qi.c
@@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$");
#include <machine/cpu.h>
#include <x86/include/busdma_impl.h>
#include <x86/iommu/intel_reg.h>
-#include <x86/iommu/busdma_dmar.h>
+#include <dev/iommu/busdma_iommu.h>
#include <dev/pci/pcireg.h>
#include <x86/iommu/intel_dmar.h>
diff --git a/sys/x86/iommu/intel_quirks.c b/sys/x86/iommu/intel_quirks.c
index 4fb17dbcff49..d0eac82e7298 100644
--- a/sys/x86/iommu/intel_quirks.c
+++ b/sys/x86/iommu/intel_quirks.c
@@ -59,7 +59,7 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_map.h>
#include <x86/include/busdma_impl.h>
#include <x86/iommu/intel_reg.h>
-#include <x86/iommu/busdma_dmar.h>
+#include <dev/iommu/busdma_iommu.h>
#include <dev/pci/pcireg.h>
#include <x86/iommu/intel_dmar.h>
#include <dev/pci/pcivar.h>
diff --git a/sys/x86/iommu/intel_utils.c b/sys/x86/iommu/intel_utils.c
index 419c6100ca1d..739952328b18 100644
--- a/sys/x86/iommu/intel_utils.c
+++ b/sys/x86/iommu/intel_utils.c
@@ -65,7 +65,7 @@ __FBSDID("$FreeBSD$");
#include <x86/include/apicvar.h>
#include <x86/include/busdma_impl.h>
#include <x86/iommu/intel_reg.h>
-#include <x86/iommu/busdma_dmar.h>
+#include <dev/iommu/busdma_iommu.h>
#include <dev/pci/pcireg.h>
#include <x86/iommu/intel_dmar.h>