Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2394760ybb; Fri, 27 Mar 2020 04:50:27 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsd6ieQv7A4F8o/68b10pJ2Z3pngy5rDTd/vNcFr+GM/I2ucT9zALizgKRf5rJK8QR26C1u X-Received: by 2002:a9d:6446:: with SMTP id m6mr9427660otl.122.1585309826882; Fri, 27 Mar 2020 04:50:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585309826; cv=none; d=google.com; s=arc-20160816; b=N7RMRtZ0Jl8rDyiAfILipUcjnTZnByE4fWv4EYHmeslIqqGuSSKA4E9heEFekKFF58 uU6BxYCAARNTN9z/HOvp13D2LRAvOO+MHwOnQ71xPSEYfp0AMrJGNnzsLoLybqCskqdZ 99WrWeDdN6fh2LQ9E/DP5n47eKhAK/b3gj+G0ekjR8ruqo+0hItYp618gypm7c0DRvbD AN2uT/OEq44UOLfpmWfKen8gBF7sXJp1FLmpQhPGqj6+kIvsLl3Tasf0HraKvMx5m1Yf t9A1ibddcA+vBcbbkSVOW/EXunJbkVuxlDfZO7jGhwkXvbC5pthR3EdvKxYg+5Bv7Ke1 Pk4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=sEayy7OnCWDZxBtx0MHyEPuHHGOJ+X9VKri69cekonc=; b=yUWm1+ZygyehvOP1DbCKso+T7oAlwAdrDLFJPtatYGXN+HCqON7CZzPxnaADi09BSM KyBI48rQUTL2qMxW50tDYRfzXWNfejKSAydT2BCLPPWFF3Vl/UDAVO0pErxIaDNvtMyv pzdyl04DqJ/kND6fduOmF0/8owe7iYlQwiyuY3VRWU9y8xQgT87tD+tPf45ZVaZUkeXq SzjsMi3rvz1HSFmeisk6xyDC4xGt3ackdeP/cCcpcDrjdUpha67x/KRqJh14UC9ZNnCb +KbgzqwGuiYYWzAXYAW1kuNErIt+EB8RzmOPyxUqrlztPuWdcWNWlsWmQuxiZYa253zq eLfQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w6si2327143ool.11.2020.03.27.04.50.13; Fri, 27 Mar 2020 04:50:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727263AbgC0Lsz convert rfc822-to-8bit (ORCPT + 99 others); Fri, 27 Mar 2020 07:48:55 -0400 Received: from mga02.intel.com ([134.134.136.20]:17099 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726165AbgC0Lsz (ORCPT ); Fri, 27 Mar 2020 07:48:55 -0400 IronPort-SDR: ZkXrjkGEHHa+C/eNFqkKJBfg05/3RxhDC7+J1P1YIK26IBS4S81dJx3vCYIpVB60Mixq3p0FHN oYVLzuwpKKHg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2020 04:48:54 -0700 IronPort-SDR: LJ3iKt4ztLwuirCI4dA8l1ODknuoQ2+0a0LcccBzG+d2ca6T4ey9t0IjZdzEi63WOlkSN+2vdu z4qU+g9VtRxg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,312,1580803200"; d="scan'208";a="358462874" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga001.fm.intel.com with ESMTP; 27 Mar 2020 04:48:54 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 27 Mar 2020 04:48:54 -0700 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 27 Mar 2020 04:48:54 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.206]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.145]) with mapi id 14.03.0439.000; Fri, 27 Mar 2020 19:48:52 +0800 From: "Tian, Kevin" To: Jacob Pan , Lu Baolu , "iommu@lists.linux-foundation.org" , LKML , Joerg Roedel , David Woodhouse , "Alex Williamson" , Jean-Philippe Brucker CC: "Liu, Yi L" , "Raj, Ashok" , Christoph Hellwig , Jonathan Cameron , Eric Auger Subject: RE: [PATCH V10 01/11] iommu/vt-d: Move domain helper to header Thread-Topic: [PATCH V10 01/11] iommu/vt-d: Move domain helper to header Thread-Index: AQHV/w5elLiwsNBFek2+dP+Mvhfg8qhcXRSg Date: Fri, 27 Mar 2020 11:48:50 +0000 Message-ID: References: <1584746861-76386-1-git-send-email-jacob.jun.pan@linux.intel.com> <1584746861-76386-2-git-send-email-jacob.jun.pan@linux.intel.com> In-Reply-To: <1584746861-76386-2-git-send-email-jacob.jun.pan@linux.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > From: Jacob Pan > Sent: Saturday, March 21, 2020 7:28 AM > > Move domain helper to header to be used by SVA code. > > Signed-off-by: Jacob Pan > Reviewed-by: Eric Auger > --- > 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 4be549478691..e599b2537b1c 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 Reviewed-by: Kevin Tian