Date: Wed, 5 Aug 2020 19:11:32 +0000 (UTC) From: Ruslan Bukin <br@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363929 - in head/sys: amd64/include dev/iommu i386/include x86/include Message-ID: <202008051911.075JBWsU070138@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: br Date: Wed Aug 5 19:11:31 2020 New Revision: 363929 URL: https://svnweb.freebsd.org/changeset/base/363929 Log: o Add machine/iommu.h and include MD iommu headers from it, so we don't ifdef for every arch in busdma_iommu.c; o No need to include specialreg.h for x86, remove it. Requested by: andrew Reviewed by: kib Sponsored by: DARPA/AFRL Differential Revision: https://reviews.freebsd.org/D25957 Added: head/sys/amd64/include/iommu.h (contents, props changed) head/sys/i386/include/iommu.h (contents, props changed) head/sys/x86/include/iommu.h (contents, props changed) Modified: head/sys/dev/iommu/busdma_iommu.c head/sys/dev/iommu/iommu_gas.c Added: head/sys/amd64/include/iommu.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/amd64/include/iommu.h Wed Aug 5 19:11:31 2020 (r363929) @@ -0,0 +1,6 @@ +/*- + * This file is in the public domain. + */ +/* $FreeBSD$ */ + +#include <x86/iommu.h> Modified: head/sys/dev/iommu/busdma_iommu.c ============================================================================== --- head/sys/dev/iommu/busdma_iommu.c Wed Aug 5 19:05:49 2020 (r363928) +++ head/sys/dev/iommu/busdma_iommu.c Wed Aug 5 19:11:31 2020 (r363929) @@ -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 Modified: head/sys/dev/iommu/iommu_gas.c ============================================================================== --- head/sys/dev/iommu/iommu_gas.c Wed Aug 5 19:05:49 2020 (r363928) +++ head/sys/dev/iommu/iommu_gas.c Wed Aug 5 19:11:31 2020 (r363929) @@ -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> /* Added: head/sys/i386/include/iommu.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/i386/include/iommu.h Wed Aug 5 19:11:31 2020 (r363929) @@ -0,0 +1,6 @@ +/*- + * This file is in the public domain. + */ +/* $FreeBSD$ */ + +#include <x86/iommu.h> Added: head/sys/x86/include/iommu.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/x86/include/iommu.h Wed Aug 5 19:11:31 2020 (r363929) @@ -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_ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008051911.075JBWsU070138>