From patchwork Thu Aug 31 17:44:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Shavit X-Patchwork-Id: 13371764 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 E2002C83F35 for ; Thu, 31 Aug 2023 17:46:54 +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=7wuaehWbae0qrOMnkVbAW1fMDiSJhYIg2VACuESeojQ=; b=pEY5zv5YYL+WeyuHG+fcTpX2o2 Y6Aervg7vXu7ZI9Ua64wZTyv7hPL5aiBO6Lj5kFZTsVRxgAZtQTNasj34wDBzau6V42LXOT4cZ7/l ifOGbbIdZm3QT1o9QKV0QXcES6MGLVKDjZoVpwUa/OBg+kMk3hgGjDqWgaqe9PFpw84ICNdOdZzZK NDZ9kdMHQXVvyfJp6OBrdYCraMWqmwMtBWVFeROKo9ovKzJK5m+JcMbYWhxqzK2/izRmE4tiWRDY0 82vI33VHRuVDW2+kCY0j7F7VA8AZd0u7YVNvjIoDguzClu4icUXs3aCXoJQ3nn7xTi7CY/PXQSYva vc0lL1fA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qblkR-00Feos-1y; Thu, 31 Aug 2023 17:46:27 +0000 Received: from mail-yw1-x114a.google.com ([2607:f8b0:4864:20::114a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qblkJ-00Fekr-0S for linux-arm-kernel@lists.infradead.org; Thu, 31 Aug 2023 17:46:20 +0000 Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-592210fe8easo13808677b3.3 for ; Thu, 31 Aug 2023 10:46:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1693503978; x=1694108778; 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=HUyVKDl0lhQ7W0ufBBYFd9SmCuZO/76W4U+SUNg412A=; b=QF0zgo9qBA6jNUiwVwElS1+zE0MqZHJ0kKaCONsncDUdo/lk3CuTrOivq7evUEsaoA CcG0/oSCFxCjy+G5NoR8+b2kEV0WyPT3yg4G8/ZofaAGCHo59DqNNm+sPMp0rWxhX9W5 MH5e3m2mD8nRdYds8TFDTkvLtEYnQX+RziW6iobaCDRKf8Gx0WrAWdyVPVxtlZPFTARr VS7fWwlM3b3g322vNr3HUygXQenHpECbcg6xu9mvtaNeujEgbbvoadrx5SRomIbWI5ii K2EYz41g7FI6f78u4GcL1k3lVwdJxZI6bjJQz86OzG2q0/eJ7Fc05wXyCrq9kNlevI3C CKCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693503978; x=1694108778; 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=HUyVKDl0lhQ7W0ufBBYFd9SmCuZO/76W4U+SUNg412A=; b=F+0Pxf+fDaPkC3US1ReU+nbcIcAeDXzBfbAgEH7z0b8gt+Oe09rWHTMncJWQ7MJILW hT/MY1zmq6C9xxcf3ZhWqfpp/cPOGaIuZB2heX27E5RramqmYFAUGyN0hx8a7Zgy/Glb wQck0VMv9049H5RUjDKvty3OaSv69CvWiSQZ603eHHtsYb/EG9pkfPrSzjTMlFidOWCt dlpWNka/Qziy/655GP2z3XrLbiQF5pTE6Oi4JZJA5uCxrdHtUnjdAUsRZ6FOKXkMMlwJ j7GnQStxmZggpO2JUKehF3I1eBL8/sdurmHFlAxn85tShg4M3hO3C6CQSxZlqvYqXkBB cHSw== X-Gm-Message-State: AOJu0Yxy0fl0fH+tteBK3dFUXojJEq1fQmTnPyuJkExmlax/6x3bnu4B TmbNi7RDJvquK4C68m17XdI2Ekk6ZxZy X-Google-Smtp-Source: AGHT+IEMJF3dc+25Kv4DjBVppSk/8Bx2EoVHGZaHW80P0+xgsookLYMJvqJ8CPuNFyU7AvC8AVo2BLS8XijP X-Received: from mshavit.ntc.corp.google.com ([2401:fa00:95:20c:1a0a:7338:4a5a:5f83]) (user=mshavit job=sendgmr) by 2002:a81:ae1f:0:b0:592:7a39:e4b4 with SMTP id m31-20020a81ae1f000000b005927a39e4b4mr3028ywh.6.1693503977969; Thu, 31 Aug 2023 10:46:17 -0700 (PDT) Date: Fri, 1 Sep 2023 01:44:36 +0800 In-Reply-To: <20230831174536.103472-1-mshavit@google.com> Mime-Version: 1.0 References: <20230831174536.103472-1-mshavit@google.com> X-Mailer: git-send-email 2.42.0.283.g2d96d420d3-goog Message-ID: <20230901014413.v7.7.Iff18df41564b9df82bf40b3ec7af26b87f08ef6e@changeid> Subject: [PATCH v7 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, jean-philippe@linaro.org, jgg@nvidia.com, nicolinc@nvidia.com, Michael Shavit , Jason Gunthorpe , Joerg Roedel , Kevin Tian , "Kirill A. Shutemov" , Lu Baolu , Mark Brown , Yicong Yang X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230831_104619_179352_F82FEF0D X-CRM114-Status: GOOD ( 13.74 ) 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 bcc94a67640d6..8d177ed550054 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; @@ -2424,7 +2420,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)