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)
 {
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to