From patchwork Wed Aug 16 13:18:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Shavit X-Patchwork-Id: 13355177 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C5BE6C001E0 for ; Wed, 16 Aug 2023 13:20:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: References:Mime-Version:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=SQ43WqfXbvl8PwLULOviRX7CH0lLjhqUqSiPXy11eDM=; b=xqK3h/gYE58STJTnfD2dpS13rr MisZQpHi/Fla5O2Vn/EA6dsvAOwGYwcDKxNeWT4rc9VXZnTyFzaGpT3qF45hxSG6/SN+52B1PV4p1 rax2kUo1KmVFoBH7HARk6Js342oSmv1Site25f8wAmfq1CZ/Yvj7Qvw/MS5ym7FrsWeHH6CMUzTk0 cmQcE8FGMdqFxKatl8HDLFHU0QqHOAqMhLLuoJnCHNBeQ4KhGEy7rOnIinRRedJ+ERulc3VRlIppx M77N25gK+uFWeqjrv4+kSOw47zT23e6xdsCQhlHIvgxEnQcBsdp1CaJdsCceJMKnxrcSrpJqIc2O9 sYa2XO7g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qWGRc-004FfZ-0n; Wed, 16 Aug 2023 13:20:16 +0000 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qWGRR-004FYq-2Q for linux-arm-kernel@lists.infradead.org; Wed, 16 Aug 2023 13:20:07 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-cf4cb742715so7020888276.2 for ; Wed, 16 Aug 2023 06:20:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1692192004; x=1692796804; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=fe3w6+O946qsePdEyrZWPsnq8o2zMwaWjfIN0ZcKH7g=; b=S5WZxqs5GurMEnLD1F7xsEeJ3tP2Kjuz5EYWQubEoDvUsMOETXpYFnHhpejZcqD7e3 NnqWI6nvnfYfN6AtL5sITmgzJP+ke6hgMwZB017TfhXOEWXnqIwu0jOz0oQjjGKp4C/T a728LmBL2d02Fj0um4QLEXYUWECa7WxmgIfaKyY0mPb0AiODM+afsc/EdvphdxJVgsoP 2Jd6L/4pY3GLCnuuZysv7bVyLcbRgx6oif+p+eOOIuOzekpKHS6LMiCE4UV4eR0XMejy FM6qp9VQKzLIhKN4odMqomAmMv6C3xplAcrPxnnCGvyny0VolV0k96Yqa1QkeZ8/6WY8 i6OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692192004; x=1692796804; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fe3w6+O946qsePdEyrZWPsnq8o2zMwaWjfIN0ZcKH7g=; b=IyPr3njnpJWH3JVGAWsVj/XprtBDwkHtYTyqD6u+nvILfDESeiBBu+yO/B21kY+FLN PiuU0Ofe7IM3eKi3NW3Z1s6xqEWjxvR3V+Zc5d+Xy7gOFqDhkRYe8/fZ+5arGEQt/NlP O/u25RX0MLl1pK6c0RtCzT2MF5ZgmJNZvjgmaI/oeLsoVarpTu/JU0EnhCMgUpoGAGcg EFhBtXVeRUbfrN/Fbc5ToBkrNQA2LN6ELPVT2AABQUGDHffhzqbly/eeNaM57ADsBd72 Kon6VjIL+p1DhjAZMg8ifEszyoBmLVFg17e3zrElX1rDpJR3qxFNzYjTI+8B3mNJJR4W oO6A== X-Gm-Message-State: AOJu0YwL6aszjhIjaYtovsLhJL38TirAUei7p20LR6vanHsl2sYThgF5 E3++6pMg9O+QVwH+jPdzZFe9iNsKYQru X-Google-Smtp-Source: AGHT+IEYlUp8zL7/YW8IE7Aj5eC7FeumYYXwQXcXhER6oHbUSHFFKPGxfH2qQQJIIq2tOTEWY90Zp1X+mIjw X-Received: from mshavit.ntc.corp.google.com ([2401:fa00:95:20c:ae98:2006:2abd:3434]) (user=mshavit job=sendgmr) by 2002:a25:748e:0:b0:d06:cbd:1f3e with SMTP id p136-20020a25748e000000b00d060cbd1f3emr26993ybc.3.1692192004153; Wed, 16 Aug 2023 06:20:04 -0700 (PDT) Date: Wed, 16 Aug 2023 21:18:47 +0800 In-Reply-To: <20230816131925.2521220-1-mshavit@google.com> Mime-Version: 1.0 References: <20230816131925.2521220-1-mshavit@google.com> X-Mailer: git-send-email 2.41.0.694.ge786442a9b-goog Message-ID: <20230816211849.v6.7.Iff18df41564b9df82bf40b3ec7af26b87f08ef6e@changeid> Subject: [PATCH v6 07/10] iommu/arm-smmu-v3: Cleanup arm_smmu_domain_finalise From: Michael Shavit To: iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: robin.murphy@arm.com, will@kernel.org, jean-philippe@linaro.org, jgg@nvidia.com, nicolinc@nvidia.com, Michael Shavit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230816_062005_790256_97F6E1EF X-CRM114-Status: GOOD ( 13.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Remove unused master parameter now that the CD table is allocated elsewhere. Reviewed-by: Jason Gunthorpe Signed-off-by: Michael Shavit Reviewed-by: Nicolin Chen --- (no changes since v5) Changes in v5: - New commit drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index 8c5e5fcd55713..de87150cd0242 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@ -2090,7 +2090,6 @@ static void arm_smmu_domain_free(struct iommu_domain *domain) } static int arm_smmu_domain_finalise_s1(struct arm_smmu_domain *smmu_domain, - struct arm_smmu_master *master, struct io_pgtable_cfg *pgtbl_cfg) { int ret; @@ -2128,7 +2127,6 @@ static int arm_smmu_domain_finalise_s1(struct arm_smmu_domain *smmu_domain, } static int arm_smmu_domain_finalise_s2(struct arm_smmu_domain *smmu_domain, - struct arm_smmu_master *master, struct io_pgtable_cfg *pgtbl_cfg) { int vmid; @@ -2153,8 +2151,7 @@ static int arm_smmu_domain_finalise_s2(struct arm_smmu_domain *smmu_domain, return 0; } -static int arm_smmu_domain_finalise(struct iommu_domain *domain, - struct arm_smmu_master *master) +static int arm_smmu_domain_finalise(struct iommu_domain *domain) { int ret; unsigned long ias, oas; @@ -2162,7 +2159,6 @@ static int arm_smmu_domain_finalise(struct iommu_domain *domain, struct io_pgtable_cfg pgtbl_cfg; struct io_pgtable_ops *pgtbl_ops; int (*finalise_stage_fn)(struct arm_smmu_domain *, - struct arm_smmu_master *, struct io_pgtable_cfg *); struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain); struct arm_smmu_device *smmu = smmu_domain->smmu; @@ -2214,7 +2210,7 @@ static int arm_smmu_domain_finalise(struct iommu_domain *domain, domain->geometry.aperture_end = (1UL << pgtbl_cfg.ias) - 1; domain->geometry.force_aperture = true; - ret = finalise_stage_fn(smmu_domain, master, &pgtbl_cfg); + ret = finalise_stage_fn(smmu_domain, &pgtbl_cfg); if (ret < 0) { free_io_pgtable_ops(pgtbl_ops); return ret; @@ -2426,7 +2422,7 @@ static int arm_smmu_attach_dev(struct iommu_domain *domain, struct device *dev) if (!smmu_domain->smmu) { smmu_domain->smmu = smmu; - ret = arm_smmu_domain_finalise(domain, master); + ret = arm_smmu_domain_finalise(domain); if (ret) smmu_domain->smmu = NULL; } else if (smmu_domain->smmu != smmu)