Date: Wed, 14 Oct 2020 14:12:16 +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: r366702 - head/sys/dev/iommu Message-ID: <202010141412.09EECGYL087875@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: br Date: Wed Oct 14 14:12:15 2020 New Revision: 366702 URL: https://svnweb.freebsd.org/changeset/base/366702 Log: Add iommu_get_ctx_domain() that allows to get iommu domain for a given iommu context. Submitted by: andrew Sponsored by: Innovate DSbD Modified: head/sys/dev/iommu/iommu.h head/sys/dev/iommu/iommu_gas.c Modified: head/sys/dev/iommu/iommu.h ============================================================================== --- head/sys/dev/iommu/iommu.h Wed Oct 14 13:39:50 2020 (r366701) +++ head/sys/dev/iommu/iommu.h Wed Oct 14 14:12:15 2020 (r366702) @@ -234,6 +234,7 @@ int bus_dma_iommu_load_ident(bus_dma_tag_t dmat, bus_d bus_dma_tag_t iommu_get_dma_tag(device_t dev, device_t child); struct iommu_ctx *iommu_get_dev_ctx(device_t dev); +struct iommu_domain *iommu_get_ctx_domain(struct iommu_ctx *ctx); SYSCTL_DECL(_hw_iommu); Modified: head/sys/dev/iommu/iommu_gas.c ============================================================================== --- head/sys/dev/iommu/iommu_gas.c Wed Oct 14 13:39:50 2020 (r366701) +++ head/sys/dev/iommu/iommu_gas.c Wed Oct 14 14:12:15 2020 (r366702) @@ -208,6 +208,13 @@ iommu_gas_rb_remove(struct iommu_domain *domain, struc RB_REMOVE(iommu_gas_entries_tree, &domain->rb_root, entry); } +struct iommu_domain * +iommu_get_ctx_domain(struct iommu_ctx *ctx) +{ + + return (ctx->domain); +} + void iommu_gas_init_domain(struct iommu_domain *domain) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202010141412.09EECGYL087875>