diff options
author | Ruslan Bukin <br@FreeBSD.org> | 2020-07-28 16:08:14 +0000 |
---|---|---|
committer | Ruslan Bukin <br@FreeBSD.org> | 2020-07-28 16:08:14 +0000 |
commit | ea4c01156a9244a084a4044bc77147adfd9167ce (patch) | |
tree | 89d027a3e0c8faf873b2d61d7ed46e7553a18f1b /sys/x86/iommu/intel_ctx.c | |
parent | c7f893a42b9572f1152d163290202b855953a768 (diff) | |
download | src-ea4c01156a9244a084a4044bc77147adfd9167ce.tar.gz src-ea4c01156a9244a084a4044bc77147adfd9167ce.zip |
o Move the buswide_ctxs bitmap to iommu_unit and rename related functions.
o Rename bus_dma_dmar_load_ident() as well.
Reviewed by: kib
Sponsored by: DARPA/AFRL
Differential Revision: https://reviews.freebsd.org/D25852
Notes
Notes:
svn path=/head/; revision=363650
Diffstat (limited to 'sys/x86/iommu/intel_ctx.c')
-rw-r--r-- | sys/x86/iommu/intel_ctx.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/x86/iommu/intel_ctx.c b/sys/x86/iommu/intel_ctx.c index 45151c8dd355..edd59e5f2477 100644 --- a/sys/x86/iommu/intel_ctx.c +++ b/sys/x86/iommu/intel_ctx.c @@ -196,7 +196,7 @@ ctx_id_entry_init(struct dmar_ctx *ctx, dmar_ctx_entry_t *ctxp, bool move, IOMMU_PGF_NOALLOC); } - if (dmar_is_buswide_ctx(unit, busno)) { + if (iommu_is_buswide_ctx((struct iommu_unit *)unit, busno)) { MPASS(!move); for (i = 0; i <= PCI_BUSMAX; i++) { ctx_id_entry_init_one(&ctxp[i], domain, ctx_root); @@ -464,6 +464,7 @@ dmar_get_ctx_for_dev1(struct dmar_unit *dmar, device_t dev, uint16_t rid, { struct dmar_domain *domain, *domain1; struct dmar_ctx *ctx, *ctx1; + struct iommu_unit *unit; dmar_ctx_entry_t *ctxp; struct sf_buf *sf; int bus, slot, func, error; @@ -480,9 +481,10 @@ dmar_get_ctx_for_dev1(struct dmar_unit *dmar, device_t dev, uint16_t rid, } enable = false; TD_PREP_PINNED_ASSERT; + unit = (struct iommu_unit *)dmar; DMAR_LOCK(dmar); - KASSERT(!dmar_is_buswide_ctx(dmar, bus) || (slot == 0 && func == 0), - ("dmar%d pci%d:%d:%d get_ctx for buswide", dmar->iommu.unit, bus, + KASSERT(!iommu_is_buswide_ctx(unit, bus) || (slot == 0 && func == 0), + ("iommu%d pci%d:%d:%d get_ctx for buswide", dmar->iommu.unit, bus, slot, func)); ctx = dmar_find_ctx_locked(dmar, rid); error = 0; |