From patchwork Thu Nov 16 01:50:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baolu Lu X-Patchwork-Id: 165652 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp2933188vqg; Wed, 15 Nov 2023 17:56:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IH3tmfY9vcznx0Hjrzdf3TrOvHcNMYiewvE46rdGkxFpU2Jf2aa1pxeI3yWBBIjYPs+WrrZ X-Received: by 2002:a17:902:cecd:b0:1cc:6597:f41e with SMTP id d13-20020a170902cecd00b001cc6597f41emr9647492plg.0.1700099766963; Wed, 15 Nov 2023 17:56:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700099766; cv=none; d=google.com; s=arc-20160816; b=rlb2jPwDmXziRbepiWqiLehBOM2kYY0R33L6DZ7fIE5yw1tHpul114Jpo2dStoft0U r92NsPVn3UC0oPF8H/JKk293sbiRmmcZH3uSIB865ZjeUejhiRNBMtsZEr6Av88FtXSz zrf43Pcp3ydo2UYp/Q5aVXVlrOVCkxFHbBbTfb2tlVna64fW1Der/b1fbxKi1ArcBSkY 5jc9mhXzJWa7Zvl06Wom8B9cWK3lfY3FH9TJzx94ByNu/w8Agqe9AunvymHS3VVDycWB wDDNHjav4CO7TPwwA9NecvUGb/Z7h8cAtnG8iKbHs0Dg3pjq/BS+HtkSMFadYjiD0h1U bxEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IoGiVCqDQDw5S6yG1NkK8AI6ZObMozBnu05C+so+o2g=; fh=5K4v/0ku97kpa0vTvhWLyUEWwXZiIFVMmzwLLirrjJ4=; b=h8ElDi/LkgtsroNBdKUsa7/i3+FA8AGP4L+MKT8vaTDndqr8U2i2GJ2lr8rNeeH/yr fW/LzVdPIPYfuhWhY677VglYf5Rj7aRBt0zi9HUt0AQkD4eApSebGqHmlOAw2QxVRs+W ykl0zPmZYFXdEdcS4s/+qDmGhV0pGkRdEttQWtNrgLNo9nSynk73IL2Dy2LZ99nU40n0 ylji4ua9SauNGSdsSq1/dKtRcIINZbhGNPI+bf7PVYCEQp7i1V1QXvEOkp/VChXXgrak Ka/n/oDT/vpRnhBvl+Mx8pZr5l6MV8K6/VIKmdVXrNJ7b1ceCo3r3/UYPbD0z8AfEIuT maDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lR1ToGmS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id c18-20020a170903235200b001c7388413besi11224910plh.529.2023.11.15.17.56.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 17:56:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lR1ToGmS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id AD2BF806E5EC; Wed, 15 Nov 2023 17:55:54 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344481AbjKPBzO (ORCPT + 28 others); Wed, 15 Nov 2023 20:55:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344473AbjKPBzN (ORCPT ); Wed, 15 Nov 2023 20:55:13 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F5B5193 for ; Wed, 15 Nov 2023 17:55:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700099710; x=1731635710; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4e2WzVgnd3QufXnBgiy7uSbAqmY5jDHIAU+FTnse2sA=; b=lR1ToGmS4YGZXv5D8GakpbzBQ3pyG9M01LvZrkjyao7DZn1C5bwy2YC+ mahltQZbMnrOffYf06GTym66M0DIYptpzNfClhYD73YRF34MI+Gd5ioGr 8rcmXxiW6GyoP6bgVaLnLQKFzyyQuxOh9ba69RKVLGzZJxRlvQjnN8h6V tUsQOq5YzKrZi/eIW4mx3uBqSa4dUq7SVmVpcgoE+G9I/CBLEtg1inikp qPOyWFEUBmc/cMkhYk7WdD4F5qMSRWTuIjtw6rp391LNuXA22UOaqWwF+ K4sQ+NmGGsAttESn/ZnE7BGQhaRafYmQaz8rKivBzYukabYzY+UQ5JnND w==; X-IronPort-AV: E=McAfee;i="6600,9927,10895"; a="381387700" X-IronPort-AV: E=Sophos;i="6.03,306,1694761200"; d="scan'208";a="381387700" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Nov 2023 17:55:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.03,306,1694761200"; d="scan'208";a="13395423" Received: from allen-box.sh.intel.com ([10.239.159.127]) by fmviesa001.fm.intel.com with ESMTP; 15 Nov 2023 17:55:07 -0800 From: Lu Baolu To: Joerg Roedel , Will Deacon , Robin Murphy , Jason Gunthorpe , Kevin Tian Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org, Lu Baolu Subject: [PATCH 2/4] iommu/vt-d: Remove unused parameter of intel_pasid_setup_pass_through() Date: Thu, 16 Nov 2023 09:50:46 +0800 Message-Id: <20231116015048.29675-3-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231116015048.29675-1-baolu.lu@linux.intel.com> References: <20231116015048.29675-1-baolu.lu@linux.intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 15 Nov 2023 17:55:54 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782683813292849579 X-GMAIL-MSGID: 1782683813292849579 The domain parameter of this helper is unused and can be deleted to avoid dead code. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian --- drivers/iommu/intel/pasid.h | 1 - drivers/iommu/intel/iommu.c | 5 ++--- drivers/iommu/intel/pasid.c | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/intel/pasid.h b/drivers/iommu/intel/pasid.h index dd37611175cc..16265bc1f7ec 100644 --- a/drivers/iommu/intel/pasid.h +++ b/drivers/iommu/intel/pasid.h @@ -111,7 +111,6 @@ int intel_pasid_setup_dirty_tracking(struct intel_iommu *iommu, struct device *dev, u32 pasid, bool enabled); int intel_pasid_setup_pass_through(struct intel_iommu *iommu, - struct dmar_domain *domain, struct device *dev, u32 pasid); int intel_pasid_setup_nested(struct intel_iommu *iommu, struct device *dev, u32 pasid, struct dmar_domain *domain); diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index b50ade814e94..3ccc2739236b 100644 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@ -2460,7 +2460,7 @@ static int dmar_domain_attach_device(struct dmar_domain *domain, if (sm_supported(iommu) && !dev_is_real_dma_subdevice(dev)) { /* Setup the PASID entry for requests without PASID: */ if (hw_pass_through && domain_type_is_si(domain)) - ret = intel_pasid_setup_pass_through(iommu, domain, + ret = intel_pasid_setup_pass_through(iommu, dev, IOMMU_NO_PASID); else if (domain->use_first_level) ret = domain_setup_first_level(iommu, domain, dev, @@ -4795,8 +4795,7 @@ static int intel_iommu_set_dev_pasid(struct iommu_domain *domain, goto out_free; if (domain_type_is_si(dmar_domain)) - ret = intel_pasid_setup_pass_through(iommu, dmar_domain, - dev, pasid); + ret = intel_pasid_setup_pass_through(iommu, dev, pasid); else if (dmar_domain->use_first_level) ret = domain_setup_first_level(iommu, dmar_domain, dev, pasid); diff --git a/drivers/iommu/intel/pasid.c b/drivers/iommu/intel/pasid.c index 74e8e4c17e81..8a1bcabf71a9 100644 --- a/drivers/iommu/intel/pasid.c +++ b/drivers/iommu/intel/pasid.c @@ -767,7 +767,6 @@ int intel_pasid_setup_dirty_tracking(struct intel_iommu *iommu, * Set up the scalable mode pasid entry for passthrough translation type. */ int intel_pasid_setup_pass_through(struct intel_iommu *iommu, - struct dmar_domain *domain, struct device *dev, u32 pasid) { u16 did = FLPT_DEFAULT_DID;