mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 v4 5/7] iommu/arm-smmu: Don't register fwnode for legacy binding
Date: Mon,  2 Oct 2023 14:49:13 +0100	[thread overview]
Message-ID: <5ae4c8ce4e83ee25a1ccfb54a1403c9371b52eca.1696253096.git.robin.murphy@arm.com> (raw)
In-Reply-To: <cover.1696253096.git.robin.murphy@arm.com>

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


  parent reply	other threads:[~2023-10-02 13:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-02 13:49 [PATCH v4 0/7] iommu: Retire bus ops Robin Murphy
2023-10-02 13:49 ` [PATCH v4 1/7] iommu: Factor out some helpers Robin Murphy
2023-10-02 13:49 ` [PATCH v4 2/7] iommu: Decouple iommu_present() from bus ops Robin Murphy
2023-10-02 14:17   ` Jason Gunthorpe
2023-10-02 14:32     ` Robin Murphy
2023-10-02 13:49 ` [PATCH v4 3/7] iommu: Validate that devices match domains Robin Murphy
2023-10-02 13:49 ` [PATCH v4 4/7] iommu: Switch __iommu_domain_alloc() to device ops Robin Murphy
2023-10-02 14:16   ` Jason Gunthorpe
2023-10-02 19:02     ` Robin Murphy
2023-10-02 19:36       ` Jason Gunthorpe
2023-10-04 17:23         ` Robin Murphy
2023-10-04 21:35           ` Jason Gunthorpe
2023-10-02 13:49 ` Robin Murphy [this message]
2023-10-02 13:49 ` [PATCH v4 6/7] iommu: Retire bus ops Robin Murphy
2023-10-02 13:49 ` [PATCH v4 7/7] iommu: Clean up open-coded ownership checks Robin Murphy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5ae4c8ce4e83ee25a1ccfb54a1403c9371b52eca.1696253096.git.robin.murphy@arm.com \
    --to=robin.murphy@arm.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@nvidia.com \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®