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: 13387067 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 C650FEE6457 for ; Fri, 15 Sep 2023 13:22:02 +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=Ue+/UKl8M2oQ+B16c+Y7xsazzKtpuacDxnANVvyZezs=; b=fCCTGRyJdJr+1udlJRjgdcZoeJ QtdVNCCk33yZlzNoKu9zdbHwfMx8ZUsYn15p2jje/Ho5rn5xsVNOLsCzsWx/R+F561a4d9ubyVRN4 TAjac3o0QSIaoJfhFsfV9bgHbj+Yjmin/ef6GsvY/ED0Gsgld59/dYgJqELxT4L2UfOuL+md6IHiN xwTSiE4ucI4D2HGhuFnY2JzR/gJbS1vG+DDl7j2CxDpmPYwpAIPCQUN9/DvE/w61CXvk1x1g8RSYV 0ykOSEJ7cKOt/oJ6DFuQSOKzS1fdMdHkEfbXPEfzt2hTzQbSSNpsuL7St1v0AsdD2UKU3z4FR/xDK X9iYhekg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qh8lN-00AnlC-1D; Fri, 15 Sep 2023 13:21:37 +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 1qh8lG-00AngK-36 for linux-arm-kernel@lists.infradead.org; Fri, 15 Sep 2023 13:21:32 +0000 Received: by mail-yb1-xb49.google.com with SMTP id 3f1490d57ef6-d818e01823aso2304609276.2 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=lists.infradead.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=biD85C/nFc4XilZTqovbC0niKvLR98WjQhM2rdXxL5HKfDNL2VO91AQoBCwhqW2czH TgMB8hUzeODI4PoMH1Rd3QjuG1wc1bQ6k7ToIrzGI/7vcFD1e/ZQR+i+qT2vluwfXpay 6XTTilKVmrNxwMKkU2PDtt7RW191sF/6hkyY/l37pYvNgOO6YisSfO5fBRjZwZg7e8Dn ewij5Qi0pGdV8z6CXPdWj5DqWbIVTh5aAi4NR6CT4Bv9+uksjiEWMGuxCoS3veblRzbA g2qGmCvosouwSn+cewXh6FOTutsUPZEbE7why74o8xrQOWqnIw6rLQQZh1pXFZR0x3xb F9Kw== 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=RP4OrBMhxLS3tBHUuIXn8JOJUTRZMacDGXWg5EavK22UsUauNIUDC9uqFvkMuAXRP2 P2a6KYhwplJ16osAEtTcaHGj2l1ZfpwLCrkfZwyudchM6gS4jiSeYqHKqlA0fr1gYZsy Jo9bj9kS6KVI2fSPFYiY20N2933bPtgJjQHDRAGxvdHfXegsEq2w1GCMtvIfbVX4flUP hrPFvoq0C+ZB0UH7Wlt/VG4jWK+g4+w2w+AcH/A64k3YeWLbL9+Oc5JgpISQjfPQL7DA 1Nlwfe8n9o4tY0kP+cao/0lhCaQ82r+EHqTCbCfVpWRcWAmmocAWwRe2I/TEQO8a+q4i DtOQ== X-Gm-Message-State: AOJu0YyjkTXBO+l+v8cqbDra51hwyt9bWYJ039rdTi5eIhjUJtckgjF6 llHLgwg1riScejU0sxQF0SbxIZdaKMR3 X-Google-Smtp-Source: AGHT+IEuJ5KcwfdedexvLlz7riXbSm41Db7pn05pdZl1N5uV4Svr00phOyLnhZeuePRuFFcvJm2feFAxCAND 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230915_062131_001634_313048C3 X-CRM114-Status: GOOD ( 13.40 ) 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: 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)