lkml.org 
[lkml]   [2020]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v13 1/8] iommu/vt-d: Move domain helper to header
    Date
    Move domain helper to header to be used by SVA code.

    Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
    Reviewed-by: Eric Auger <eric.auger@redhat.com>
    Reviewed-by: Kevin Tian <kevin.tian@intel.com>
    ---
    drivers/iommu/intel-iommu.c | 6 ------
    include/linux/intel-iommu.h | 6 ++++++
    2 files changed, 6 insertions(+), 6 deletions(-)

    diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
    index ef0a5246700e..60c31db9ee93 100644
    --- a/drivers/iommu/intel-iommu.c
    +++ b/drivers/iommu/intel-iommu.c
    @@ -446,12 +446,6 @@ static void init_translation_status(struct intel_iommu *iommu)
    iommu->flags |= VTD_FLAG_TRANS_PRE_ENABLED;
    }

    -/* Convert generic 'struct iommu_domain to private struct dmar_domain */
    -static struct dmar_domain *to_dmar_domain(struct iommu_domain *dom)
    -{
    - return container_of(dom, struct dmar_domain, domain);
    -}
    -
    static int __init intel_iommu_setup(char *str)
    {
    if (!str)
    diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
    index 980234ae0312..ed7171d2ae1f 100644
    --- a/include/linux/intel-iommu.h
    +++ b/include/linux/intel-iommu.h
    @@ -595,6 +595,12 @@ static inline void __iommu_flush_cache(
    clflush_cache_range(addr, size);
    }

    +/* Convert generic struct iommu_domain to private struct dmar_domain */
    +static inline struct dmar_domain *to_dmar_domain(struct iommu_domain *dom)
    +{
    + return container_of(dom, struct dmar_domain, domain);
    +}
    +
    /*
    * 0: readable
    * 1: writable
    --
    2.7.4
    \
     
     \ /
      Last update: 2020-05-14 00:57    [W:4.882 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site