Author: br
Date: Mon Nov 16 15:29:52 2020
New Revision: 367725
URL: https://svnweb.freebsd.org/changeset/base/367725

Log:
  Add device_t member to struct iommu.
  
  This is needed on arm64 for the interface between iommu framework
  and iommu controller drivers.
  
  Reviewed by:  kib
  Sponsored by: Innovate DSbD
  Differential Revision:        https://reviews.freebsd.org/D27229

Modified:
  head/sys/dev/iommu/iommu.h
  head/sys/x86/iommu/intel_drv.c

Modified: head/sys/dev/iommu/iommu.h
==============================================================================
--- head/sys/dev/iommu/iommu.h  Mon Nov 16 11:58:22 2020        (r367724)
+++ head/sys/dev/iommu/iommu.h  Mon Nov 16 15:29:52 2020        (r367725)
@@ -67,6 +67,7 @@ struct iommu_map_entry {
 
 struct iommu_unit {
        struct mtx lock;
+       device_t dev;
        int unit;
 
        int dma_enabled;

Modified: head/sys/x86/iommu/intel_drv.c
==============================================================================
--- head/sys/x86/iommu/intel_drv.c      Mon Nov 16 11:58:22 2020        
(r367724)
+++ head/sys/x86/iommu/intel_drv.c      Mon Nov 16 15:29:52 2020        
(r367725)
@@ -411,6 +411,7 @@ dmar_attach(device_t dev)
        unit = device_get_softc(dev);
        unit->dev = dev;
        unit->iommu.unit = device_get_unit(dev);
+       unit->iommu.dev = dev;
        dmaru = dmar_find_by_index(unit->iommu.unit);
        if (dmaru == NULL)
                return (EINVAL);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to