From patchwork Tue Aug 8 17:12:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Shavit X-Patchwork-Id: 13346511 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 2B25CC001B0 for ; Tue, 8 Aug 2023 17:16:00 +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=oJ3FEdOof3TBQJ5aub+N2hOx6dxe+UVf2m1skL42/h8=; b=RXO9Lj0aPdFVtvo9TGZnNJRTbz 2QTpFn5ZtK6K6DuK1T25odfp+YgX2IB/FIiA3kwt28ige40gG2KlBUnwllGY1ZgpeV9zF5RGei4d8 CAB7KBGJEsPmmhap9nGrBeamRFh/EWnKbwnsp+lBW/j9n5smfy1f/IQHAkkNT1Yv9tYD0cBzBF3p7 1aNH6K2DXChUbbKe0NDV63CTYUDIrcnUpqfxvV91q7Hyc2n60jHieBXN2tCNDqFZgzWtPQL4gxycA WlPEDur2wNS1AO+ezExy6tZ3rO4hE8p2bXvLYzsFM1uj3lMmxDCmGWXF6wTyZgHtg13b9PjbBlgv+ EhX68gzQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qTQIu-0036Ey-2p; Tue, 08 Aug 2023 17:15:32 +0000 Received: from mail-yb1-xb49.google.com ([2607:f8b0:4864:20::b49]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qTQIq-0036Bo-2f for linux-arm-kernel@lists.infradead.org; Tue, 08 Aug 2023 17:15:30 +0000 Received: by mail-yb1-xb49.google.com with SMTP id 3f1490d57ef6-d4cbf6b593bso3600642276.0 for ; Tue, 08 Aug 2023 10:15:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1691514927; x=1692119727; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=DHC0KhIFpW5NTjYdIfQpCvuClzcsgZwi0HrA23/4P2Y=; b=JvC5MZkolQL3+jANntlSYMOylNcISlimU/y0d4N3dr5wEcjfYYgltrYjhiES7mOl2Y Ov/twqwpI1VT7nGpJ10HSecukMP7JjhRsaHzoTuSY1uHllGHq5QV8Dw8VcjFc88LHfCC yvqIHBD+L229K+5h3r44DhySpf/5xangjP4KGU7gIWLnEP6tyARGBxNLrJMIGnVEuNVD FCnzoPQw6nydn60CxXmNoDtrQ4g4D19DCMYPAeY/N+hStGbwQ6GR2qztXJI3fp3Gq5iA 1URmWGqiUKNT6EzYQz+0P5dUXpiIABYzrYuZYvbAnw9bFLBRsz++gB5gDsabSg8x1Dg7 wP8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691514927; x=1692119727; 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=DHC0KhIFpW5NTjYdIfQpCvuClzcsgZwi0HrA23/4P2Y=; b=L75q6kG4HrF4u07coEOWONLnXLd8Z4L91XQhQG3rgD3SambiThsHH36Ek07M7mMDvA T4HyDYw63JM7YOpzUN1+kbq6vAl9j5oSLgUAP1kPuFsV6NyO7D6k2xXphgvFqX1tH90j rqPK/cD14L+YZyEFcbkK5iFs2tMZf/QGKXZ+u+iH8nUqe1ZrMVmYpoGmb0w6YN3AFEN0 KlN2HkAyQcbVAbZxEr4TF1kj3WTZ88vXhEQFR7f6VxCTHz59E3rPoJ29bIKGBNMeCCJb ffiEyH3YFaGDFVwZfnsncITIbs6hvC90hZeaG7MpHiM+PqDq3V/e8SQAD3IFl+ohE3bE c3qg== X-Gm-Message-State: AOJu0YxjnKN3cIO3EzpyqO6IoxoYLHa3KI8SJNu4waht17vEM0r6xXPc F5NQBN+5+Iknq7CkdXKjuvtFGlBAJf1t X-Google-Smtp-Source: AGHT+IG7laxc61w6Ym0eBdUMWuNThcVfKU8hYxqNr7YAQlpUKSbawwC1KUfs2n737hePYJJZMC7AEV8t5FYY X-Received: from mshavit.ntc.corp.google.com ([2401:fa00:95:20c:986a:71d7:3b1e:ac1d]) (user=mshavit job=sendgmr) by 2002:a25:e70a:0:b0:cb1:918b:d19b with SMTP id e10-20020a25e70a000000b00cb1918bd19bmr2934ybh.0.1691514927517; Tue, 08 Aug 2023 10:15:27 -0700 (PDT) Date: Wed, 9 Aug 2023 01:12:03 +0800 In-Reply-To: <20230808171446.2187795-1-mshavit@google.com> Mime-Version: 1.0 References: <20230808171446.2187795-1-mshavit@google.com> X-Mailer: git-send-email 2.41.0.640.ga95def55d0-goog Message-ID: <20230809011204.v5.7.Iff18df41564b9df82bf40b3ec7af26b87f08ef6e@changeid> Subject: [PATCH v5 7/9] 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: will@kernel.org, robin.murphy@arm.com, nicolinc@nvidia.com, jgg@nvidia.com, jean-philippe@linaro.org, Michael Shavit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230808_101528_864069_16A23077 X-CRM114-Status: GOOD ( 13.35 ) 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 --- 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 3f32f9a191a5f..f5ad386cc8760 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@ -2092,7 +2092,6 @@ static void arm_smmu_domain_free(struct iommu_domain *domain) } static int arm_smmu_domain_finalise_cd(struct arm_smmu_domain *smmu_domain, - struct arm_smmu_master *master, struct io_pgtable_cfg *pgtbl_cfg) { int ret; @@ -2130,7 +2129,6 @@ static int arm_smmu_domain_finalise_cd(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; @@ -2155,8 +2153,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; @@ -2164,7 +2161,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; @@ -2216,7 +2212,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; @@ -2428,7 +2424,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)