Message ID | 3a5cd62dd21ed58f337bb9a389d301054e503dc3.1697047261.git.robin.murphy@arm.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp728424vqb; Wed, 11 Oct 2023 11:16:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEm4STfThULzHddo+oE8Xlcx5bJMnqQNm84KoRphWBn4iojErnG0NjXFlWbbaMdvC7IOjGM X-Received: by 2002:a05:6a20:3d04:b0:13d:d5bd:758f with SMTP id y4-20020a056a203d0400b0013dd5bd758fmr27034629pzi.6.1697048182261; Wed, 11 Oct 2023 11:16:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697048182; cv=none; d=google.com; s=arc-20160816; b=0FqnsvjwzYVHai4rwT61+l4+Cbtmy+xp0NyUO0iQZd2JujdfUGU5FS2rIf7KcNjRE6 M/LDlpQUmvrL+xZk6MGj96ktpoTBnZBxJ2e4tE9PNhV5FaJsqR6sNg4wV9X/cq0fUIan x8fTy5RtrO6kG5IoFKTpN27CHLMVCYAbmX7sJPDeSgZPgVJ7t7z8qEjSK4+xDNRxwPLt 4JLODaIw/d2JS5j879Alhmv2cmPM1WAToKwvkhyqc+OqPqEd4uzAfYdYnCRcS6YHeGeS gOHjs/i6+onTfgrCUdgzbM5W0MJ1u1E28JnuWZnZ0ejyLD/n2XoC+WXVGlX/J2K9OGsf G3tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=nS4yDMN0W5VvuizcUtsFQDfU4sNJ9NvWyTXVZxft1rk=; fh=3nQM0QufZPSZ94JO+WDmHkrFziuG1/NJr0OD1jy0Wvc=; b=YkVetovzRagSQB3pFXCqfwp0uylPuh9KIjNgdmQN9woRzGNXyTYoViz19X0NeM1ZR8 P8N7yTXA5l9KhPRGdMlDJHQycbuihi9fYun8R5N/UFH9V8xqd2PJHEWP+wFmqJPIkOxY 7kjdSh1/fMy4aKNOq3iJNewPEKlfa3R8i4mY58UyEKM+amFoWA8pPJWZ7AqtF9hnDMo8 F5HshehkeZyYuIGNBclhrvptT8DfctUXjW2h9HQWWOAWgRj2PUQl/wplmlXQXf7JZ+T4 otuZ64kjFzBMzNEer45IverL8VTYYLYocdJgWruazSyB5h1lupyFHB5IuQ/9X/Sgur0a 9whg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id i189-20020a639dc6000000b00589b872029dsi328670pgd.30.2023.10.11.11.16.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 11:16:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 07A7E808D29A; Wed, 11 Oct 2023 11:15:52 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233215AbjJKSPX (ORCPT <rfc822;kartikey406@gmail.com> + 18 others); Wed, 11 Oct 2023 14:15:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233183AbjJKSPM (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 11 Oct 2023 14:15:12 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C325AC6 for <linux-kernel@vger.kernel.org>; Wed, 11 Oct 2023 11:15:08 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4ED1D14BF; Wed, 11 Oct 2023 11:15:49 -0700 (PDT) Received: from e121345-lin.cambridge.arm.com (e121345-lin.cambridge.arm.com [10.1.196.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id A721E3F5A1; Wed, 11 Oct 2023 11:15:07 -0700 (PDT) From: Robin Murphy <robin.murphy@arm.com> To: joro@8bytes.org, will@kernel.org Cc: iommu@lists.linux.dev, jgg@nvidia.com, baolu.lu@linux.intel.com, linux-kernel@vger.kernel.org Subject: [PATCH v5 5/7] iommu/arm-smmu: Don't register fwnode for legacy binding Date: Wed, 11 Oct 2023 19:14:52 +0100 Message-Id: <3a5cd62dd21ed58f337bb9a389d301054e503dc3.1697047261.git.robin.murphy@arm.com> X-Mailer: git-send-email 2.39.2.101.g768bb238c484.dirty In-Reply-To: <cover.1697047261.git.robin.murphy@arm.com> References: <cover.1697047261.git.robin.murphy@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 11 Oct 2023 11:15:52 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779483994664873157 X-GMAIL-MSGID: 1779483994664873157 |
Series |
iommu: Retire bus ops
|
|
Commit Message
Robin Murphy
Oct. 11, 2023, 6:14 p.m. UTC
When using the legacy binding we bypass the of_xlate mechanism, so avoid registering the instance fwnodes which act as keys for that. This will help __iommu_probe_device() to retrieve the registered ops the same way as for x86 etc. when no fwspec has previously been set up by of_xlate. Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Robin Murphy <robin.murphy@arm.com> --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Comments
On Wed, Oct 11, 2023 at 07:14:52PM +0100, Robin Murphy wrote: > When using the legacy binding we bypass the of_xlate mechanism, so avoid > registering the instance fwnodes which act as keys for that. This will > help __iommu_probe_device() to retrieve the registered ops the same way > as for x86 etc. when no fwspec has previously been set up by of_xlate. > > Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> > Signed-off-by: Robin Murphy <robin.murphy@arm.com> > --- > drivers/iommu/arm/arm-smmu/arm-smmu.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c > index d6d1a2a55cc0..4b83a3adacd6 100644 > --- a/drivers/iommu/arm/arm-smmu/arm-smmu.c > +++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c > @@ -2161,7 +2161,8 @@ static int arm_smmu_device_probe(struct platform_device *pdev) > return err; > } > > - err = iommu_device_register(&smmu->iommu, &arm_smmu_ops, dev); > + err = iommu_device_register(&smmu->iommu, &arm_smmu_ops, > + using_legacy_binding ? NULL : dev); > if (err) { > dev_err(dev, "Failed to register iommu\n"); > iommu_device_sysfs_remove(&smmu->iommu); > -- > 2.39.2.101.g768bb238c484.dirty Acked-by: Will Deacon <will@kernel.org> Will
On Wed, Oct 11, 2023 at 07:14:52PM +0100, Robin Murphy wrote: > When using the legacy binding we bypass the of_xlate mechanism, so avoid > registering the instance fwnodes which act as keys for that. This will > help __iommu_probe_device() to retrieve the registered ops the same way > as for x86 etc. when no fwspec has previously been set up by of_xlate. > > Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> > Signed-off-by: Robin Murphy <robin.murphy@arm.com> > --- > drivers/iommu/arm/arm-smmu/arm-smmu.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c > index d6d1a2a55cc0..4b83a3adacd6 100644 > --- a/drivers/iommu/arm/arm-smmu/arm-smmu.c > +++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c > @@ -2161,7 +2161,8 @@ static int arm_smmu_device_probe(struct platform_device *pdev) > return err; > } > > - err = iommu_device_register(&smmu->iommu, &arm_smmu_ops, dev); > + err = iommu_device_register(&smmu->iommu, &arm_smmu_ops, > + using_legacy_binding ? NULL : dev); > if (err) { > dev_err(dev, "Failed to register iommu\n"); > iommu_device_sysfs_remove(&smmu->iommu); > -- > 2.39.2.101.g768bb238c484.dirty > Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c index d6d1a2a55cc0..4b83a3adacd6 100644 --- a/drivers/iommu/arm/arm-smmu/arm-smmu.c +++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c @@ -2161,7 +2161,8 @@ static int arm_smmu_device_probe(struct platform_device *pdev) return err; } - err = iommu_device_register(&smmu->iommu, &arm_smmu_ops, dev); + err = iommu_device_register(&smmu->iommu, &arm_smmu_ops, + using_legacy_binding ? NULL : dev); if (err) { dev_err(dev, "Failed to register iommu\n"); iommu_device_sysfs_remove(&smmu->iommu);