summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorRuslan Bukin <br@FreeBSD.org>2020-08-05 19:11:31 +0000
committerRuslan Bukin <br@FreeBSD.org>2020-08-05 19:11:31 +0000
commitc4cd69901032954bb089de4d5cd751413bec655f (patch)
tree46086a9ac2da81ff918e2682242475af47aad458 /sys
parent94e9ef85c594951f9d9d0e4cd7595e9cd2f792da (diff)
downloadsrc-test2-c4cd69901032954bb089de4d5cd751413bec655f.tar.gz
src-test2-c4cd69901032954bb089de4d5cd751413bec655f.zip
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/include/iommu.h6
-rw-r--r--sys/dev/iommu/busdma_iommu.c9
-rw-r--r--sys/dev/iommu/iommu_gas.c4
-rw-r--r--sys/i386/include/iommu.h6
-rw-r--r--sys/x86/include/iommu.h13
5 files changed, 28 insertions, 10 deletions
diff --git a/sys/amd64/include/iommu.h b/sys/amd64/include/iommu.h
new file mode 100644
index 000000000000..3737d51fdcef
--- /dev/null
+++ b/sys/amd64/include/iommu.h
@@ -0,0 +1,6 @@
+/*-
+ * This file is in the public domain.
+ */
+/* $FreeBSD$ */
+
+#include <x86/iommu.h>
diff --git a/sys/dev/iommu/busdma_iommu.c b/sys/dev/iommu/busdma_iommu.c
index 428880f85d01..908ed6933c68 100644
--- a/sys/dev/iommu/busdma_iommu.c
+++ b/sys/dev/iommu/busdma_iommu.c
@@ -59,17 +59,12 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_object.h>
#include <vm/vm_page.h>
#include <vm/vm_map.h>
+#include <dev/iommu/iommu.h>
#include <machine/atomic.h>
#include <machine/bus.h>
#include <machine/md_var.h>
-#if defined(__amd64__) || defined(__i386__)
-#include <machine/specialreg.h>
-#include <x86/include/busdma_impl.h>
-#include <x86/iommu/intel_reg.h>
+#include <machine/iommu.h>
#include <dev/iommu/busdma_iommu.h>
-#include <dev/iommu/iommu.h>
-#include <x86/iommu/intel_dmar.h>
-#endif
/*
* busdma_iommu.c, the implementation of the busdma(9) interface using
diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c
index 0baf996bf416..d6a09d852bfb 100644
--- a/sys/dev/iommu/iommu_gas.c
+++ b/sys/dev/iommu/iommu_gas.c
@@ -65,9 +65,7 @@ __FBSDID("$FreeBSD$");
#include <machine/atomic.h>
#include <machine/bus.h>
#include <machine/md_var.h>
-#if defined(__amd64__) || defined(__i386__)
-#include <x86/iommu/intel_reg.h>
-#endif
+#include <machine/iommu.h>
#include <dev/iommu/busdma_iommu.h>
/*
diff --git a/sys/i386/include/iommu.h b/sys/i386/include/iommu.h
new file mode 100644
index 000000000000..3737d51fdcef
--- /dev/null
+++ b/sys/i386/include/iommu.h
@@ -0,0 +1,6 @@
+/*-
+ * This file is in the public domain.
+ */
+/* $FreeBSD$ */
+
+#include <x86/iommu.h>
diff --git a/sys/x86/include/iommu.h b/sys/x86/include/iommu.h
new file mode 100644
index 000000000000..2757f1554258
--- /dev/null
+++ b/sys/x86/include/iommu.h
@@ -0,0 +1,13 @@
+/*-
+ * This file is in the public domain.
+ */
+/* $FreeBSD$ */
+
+#ifndef _MACHINE_IOMMU_H_
+#define _MACHINE_IOMMU_H_
+
+#include <x86/include/busdma_impl.h>
+#include <x86/iommu/intel_reg.h>
+#include <x86/iommu/intel_dmar.h>
+
+#endif /* !_MACHINE_IOMMU_H_ */