Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3989939pxb; Tue, 25 Jan 2022 00:50:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxlG05O4SjiJOhkjbE4nS5FmZPQqYuN8Q5YuR7iFJZnoMbeM3NkafHGNDD6Rouz5N8cXCAG X-Received: by 2002:aa7:8154:0:b0:4bc:a467:614d with SMTP id d20-20020aa78154000000b004bca467614dmr17314630pfn.48.1643100640789; Tue, 25 Jan 2022 00:50:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643100640; cv=none; d=google.com; s=arc-20160816; b=RjJAt47dK0e9CdDb0XE/MKlpcO/rsjW4X0oDjCDen7DeuZviXRJCz8FZqR+MpE2vTl 7WIdQzSv9IxQgljm80u9vvB3XE3mcOgYPoPQRJECZHCOHWwF8OQwySdp5BCEB/BI1spf bHf1dhxV56c2Q56ktZLOuAdQmZWhNn8IuizcNdWg1jpD0MI5fdk4lEaDE5NCKuxQjR37 0H4bCDuYyH5eT3VOxmJbgu88GAM4tcqbY5gVmmmdlQ9tnvke2JF0UmwWU2Z345Elpdb8 2Mpvk502xs/0MBonnNIkEhXMftQsJRDrV12cASJ2h5SwwQcyEdma6mPRg4RJCq5kY2It veJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:cc:dkim-signature; bh=ucAQWRVD292Yc6LOgrrLLOpAdzF1gWzAcugEtBX1BaU=; b=Xf/5B8jt0NW9hPrh6xnOoCHOFq5hMwfrOGim3uAQwHpsMIbS5gDwIZvs1XABx3AsMi /mg5m2Fck/CtQXT2qR1OLbANPqso/tl73qnxNYXJsQryma7HFh3Gy75OR0kK5qToFLaV /d1uk0JEvVsK9X+aVO+1ZOQ6YT4Wn6xZQNj7WghfzREfDIwl0twzX/t8H+sL8VRa6qTY 2i2BhZ+LevqSmgXCQlxFYvdn5Hrm2pNU01UfPQK/2u0EFFfq4CRF1wJDlj+4I5oDpv34 ivWci0LIo73eB5LHoilKWrB4aJrSgQ7JKq0L9nGZ48WiGtVM/uRxXZjmD75aIiaFHxum TXnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Bpm13Y77; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w17si15270550pll.453.2022.01.25.00.50.29; Tue, 25 Jan 2022 00:50:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Bpm13Y77; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355556AbiAYDXr (ORCPT + 99 others); Mon, 24 Jan 2022 22:23:47 -0500 Received: from mga06.intel.com ([134.134.136.31]:10769 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1319531AbiAYDJF (ORCPT ); Mon, 24 Jan 2022 22:09:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643080145; x=1674616145; h=cc:subject:to:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=xFZOp1fGsqzXn/fUyBiOUmJ92pSPaeM/so/3oAX5ed4=; b=Bpm13Y77m0B7h97A69uPYIAZdah9C5hsqofPyraBp7E5Jzwp12mVZ5Lq 7tzYXvRiprUN02iew7GRTKchluyc6LAvq2x2z3DGJjCx+BQTGUchvjiPe Q8nBSVveNeffmi3J6sXSa1djj9YjF5R2s9571FKU/tFAT/mBv4/TirXHe 7KZVNHRgUot3cxQ0Bhx/MuO3+/wKTVCEKeUb/WnG9E4DuAnWlL5bj721u t2F5Rie/vHdfb7/wP6bA96NlVilWNTwNj5kepkdLMKYBtcdOwwUK5jTp8 VpHE3Tf8+9/OdEQc5HFB+MfaagAhdaU8ImmjkZ9FpfMvbvfCIYIPjKVsv w==; X-IronPort-AV: E=McAfee;i="6200,9189,10237"; a="306920745" X-IronPort-AV: E=Sophos;i="5.88,313,1635231600"; d="scan'208";a="306920745" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jan 2022 19:05:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,313,1635231600"; d="scan'208";a="534532285" Received: from allen-box.sh.intel.com (HELO [10.239.159.118]) ([10.239.159.118]) by orsmga008.jf.intel.com with ESMTP; 24 Jan 2022 19:05:05 -0800 Cc: baolu.lu@linux.intel.com, Alex Williamson , Eric Auger , "Liu, Yi L" , "Pan, Jacob jun" , David Airlie , Daniel Vetter , Thierry Reding , Jonathan Hunter , "iommu@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 6/7] iommu: Use right way to retrieve iommu_ops To: "Tian, Kevin" , Joerg Roedel , Jason Gunthorpe , Christoph Hellwig , Ben Skeggs , "Raj, Ashok" , Will Deacon , Robin Murphy References: <20220124071103.2097118-1-baolu.lu@linux.intel.com> <20220124071103.2097118-7-baolu.lu@linux.intel.com> From: Lu Baolu Message-ID: <229d72cf-3d1b-8df2-7438-309893f6aa9a@linux.intel.com> Date: Tue, 25 Jan 2022 11:04:05 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/24/22 5:48 PM, Tian, Kevin wrote: >> From: Lu Baolu >> Sent: Monday, January 24, 2022 3:11 PM >> diff --git a/include/linux/iommu.h b/include/linux/iommu.h >> index aa5486243892..111b3e9c79bb 100644 >> --- a/include/linux/iommu.h >> +++ b/include/linux/iommu.h >> @@ -385,6 +385,14 @@ static inline void iommu_iotlb_gather_init(struct >> iommu_iotlb_gather *gather) >> }; >> } >> >> +static inline const struct iommu_ops *dev_iommu_ops_get(struct device >> *dev) > > dev_get_iommu_ops or just dev_iommu_ops? dev_iommu_ops() looks better. Best regards, baolu