From patchwork Fri Sep 15 13:17:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Shavit X-Patchwork-Id: 140538 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1174828vqi; Fri, 15 Sep 2023 09:34:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGslMbj70+zdM+rmo6iBjuTYL0h9GGbV9Sa/8wNVTDkfGdG6TxIFI5uVFDKy0d387PJiBIJ X-Received: by 2002:a17:902:7795:b0:1bb:f1d9:432e with SMTP id o21-20020a170902779500b001bbf1d9432emr1948803pll.37.1694795662079; Fri, 15 Sep 2023 09:34:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694795662; cv=none; d=google.com; s=arc-20160816; b=vXj09QBcnOVZY4HpNVZPQnjIcLjLdo0C7wIkEpLzIgXbxF9WFf8KQu0ANfty0i5zKf Sza+T4JGkaoCKDAmzXMkVr9lo9sZ+CZYcUba6H1dTZNNjc76R3DS/zXDVPbMye8w1I1k FxzPp/qyGAW/305Y4hZ8+LwSzJLgYOuZXZ3IyIBanO05Zs8d59RfBNWIS+xPCk06mGGL 1GFLE+JjZ7kgWiMiDRMJu1r+2gV9IstL4+OMrVYc2zpUdME0ureIkApNIsjqHIoCZFjQ zdsn+MpFb1sPfTd981ip9WvFM/1DQy635BDhLkF5cvXIDKmwp/SvgEDlvnuss8zYwRJS LbyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=GJc+j08yY490Vv/eC62RVS7PByOeYuEaCKVM2vlNjBk=; fh=yLUVUCpwXxa7JvtfFJiLr61NZJXkXSzdUYJStTN7VZ4=; b=NYd30cC6Oervbp3YI7+l184tbkINptCpH6RAwY09SiTa/CSTymJZTowJVZXrKmh91I /U9KOHg7vKWEqZGNvl0NMTkLK7rLqPIP/ctpI120fbK9lsGbnxq2YRkhA2zBhBgROL07 2a0TjPg//oPFlcfga3nYMG38ZcfCMcyLhfhJZcHQtXJN2Y3e1NYyQcj42G7lwIi4wBEE D/enmgcTS3zkLWlpsU4bcYq4tt1vjj8zGzHTaBt3u6z1nqTm5xP6NQdvQTo1uWQ6z4B2 ztYOfoZdP7d+E2OTanw3Y67Wa0dpg7vblgBMXxRiSWD4tb3n43hsrudUUtqybGnq7rUu 1FVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=KU9HW2I7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id m9-20020a654389000000b00573fffb12a6si3369062pgp.793.2023.09.15.09.34.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 09:34:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=KU9HW2I7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 3E7CB820914A; Fri, 15 Sep 2023 06:22:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235323AbjIONVt (ORCPT + 31 others); Fri, 15 Sep 2023 09:21:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235242AbjIONVs (ORCPT ); Fri, 15 Sep 2023 09:21:48 -0400 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9997F2703 for ; Fri, 15 Sep 2023 06:21:30 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-59bee08c13aso23094867b3.0 for ; Fri, 15 Sep 2023 06:21:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1694784089; x=1695388889; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=GJc+j08yY490Vv/eC62RVS7PByOeYuEaCKVM2vlNjBk=; b=KU9HW2I7PjyvCIWtpu0SvukLJcODX1uGeciMIsP2VugqcGPxyoO7m5j7F0Qyxmsj/h blSEx65WmjynPibbBSpAlfDCmdn4F8rcR9DIYI+jGSkWB3yBn19WSnrUqid5ld078m9M 2t4v63+7XUsj1CEeYzwkW8FockxDYLHOZ114gTmAfnX/6iZHoVyx5Ec9tugFxTd9w+1E f8YdQOztmlz5rfTwR/VPc2MKxsXAutvwrcXOG/Jsp/FT5A+HzL33Sob+xLjR5fHQ6o/Z KOd920dd8d7mgqfCk0F9GTaabMtLOjCUak0KZqu3AI7L4qNp3dJb7A1Pg1u145lHkgoP Fe6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694784089; x=1695388889; 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=GJc+j08yY490Vv/eC62RVS7PByOeYuEaCKVM2vlNjBk=; b=BKS2UXEwSPPy2ncNtSDcvVbDSF0eer47okmnLDCrKKVJsnqf8/PkMvWPcweew9qcQs tZgv2NcmokriegWHGUvjJ/3lMBoo8FjGfYR+IVG//jFQemr8sw6vv/3vFiX9Emzd3cWk YYTp+YJ8YVvtxLv2IyoU8hooglImSWVMV/FRX2iXh0QkK78Eiawj6gLPZRMXV2XHGVYN oWHJ+G4AVCxs6No27V7U1DqykUKxGyOIowmSbJw5e/LHriaxdYT6f4pO4xrIVbXR0hA+ F8PbIaw4VwMNeyNv3Z1CAiLjUaMtYnQvter415a28OUQjGWMEUUDcS7HOtijHXds5yz4 wAAA== X-Gm-Message-State: AOJu0YzYuFmTLNpTVUwwVxvNJ5v5l6YTgncmKtlY6KLU61ky3O6T8JCX YU2rbFoACuY9zZ4y3mX5jkFalX9One5P X-Received: from mshavit.ntc.corp.google.com ([2401:fa00:95:20c:47bc:d53f:1c50:a3f2]) (user=mshavit job=sendgmr) by 2002:a5b:b03:0:b0:d81:6927:d806 with SMTP id z3-20020a5b0b03000000b00d816927d806mr35071ybp.0.1694784089726; Fri, 15 Sep 2023 06:21:29 -0700 (PDT) Date: Fri, 15 Sep 2023 21:17:38 +0800 In-Reply-To: <20230915132051.2646055-1-mshavit@google.com> Mime-Version: 1.0 References: <20230915132051.2646055-1-mshavit@google.com> X-Mailer: git-send-email 2.42.0.459.ge4e396fd5e-goog Message-ID: <20230915211705.v8.7.Iff18df41564b9df82bf40b3ec7af26b87f08ef6e@changeid> Subject: [PATCH v8 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: nicolinc@nvidia.com, jgg@nvidia.com, jean-philippe@linaro.org, robin.murphy@arm.com, will@kernel.org, Michael Shavit , Alistair Popple , Dawei Li , Jacob Pan , Jason Gunthorpe , Joerg Roedel , Kevin Tian , "Kirill A. Shutemov" , Lu Baolu , Tomas Krcka X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Fri, 15 Sep 2023 06:22:11 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777122055990463911 X-GMAIL-MSGID: 1777122055990463911 Remove unused master parameter now that the CD table is allocated elsewhere. Reviewed-by: Nicolin Chen Reviewed-by: Jason Gunthorpe Signed-off-by: Michael Shavit --- (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 25ce62d25732c..f9bfa2c8ab1e3 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@ -2072,7 +2072,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; @@ -2110,7 +2109,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; @@ -2137,8 +2135,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; @@ -2146,7 +2143,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; @@ -2198,7 +2194,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; @@ -2408,7 +2404,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)