Message ID | 93678b819d70079797734d9a8b0ebdc5beca43d2.1674753627.git.robin.murphy@arm.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp423934wrn; Thu, 26 Jan 2023 10:32:09 -0800 (PST) X-Google-Smtp-Source: AMrXdXtyluct5qh7D10NOIvBO0V8aly503pjAfxvRZLo8Liz95EMhTD2WEt06W49bMj4X9P74Xw+ X-Received: by 2002:a17:906:abd8:b0:7b1:316c:38f5 with SMTP id kq24-20020a170906abd800b007b1316c38f5mr40852280ejb.30.1674757929716; Thu, 26 Jan 2023 10:32:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674757929; cv=none; d=google.com; s=arc-20160816; b=gUHcgV7+VDR3sStRwt9EuVvSc4UvOHQX/nhGhLa3jQ8rU4fhfZSrcCY7boCNiANfY3 Geo2aoag5XXUFC/wBGgfjYZwLMatzrTO+nrt4g81+ok1rZnfY64MNGbCcGRhljCzRg3D aK1gKW0sL1ydIUUZXJb+efsieUPK6q1BcD1gWWyjj6dp5LyKJyfmQv5te9bmP60qGUJ/ 4Tysl9nYwa+8BIm+miW9hQhIJwNkG4KQplgDXan7JKlRyJ59SJ5IEAovGTlOfc+kVqDB c3Q9V7hJ5tSSJaY9L3KxUQd131scUhcng7TAefgxw5fHtnUriMwfN3dkZsKr9xKj5WMt v4kA== 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=J2JghlX4AhSQc4KETHhd8fje5a82UgciajbtaMwNL1w=; b=z0biezKPBykhlhM+WykJYtQZ4gYu3hpHOfZO7wfAbSxq+oH4pJpridgOERwNMmBtRp CjK1Kf9Kfzhb2J9GAfQ/OPtb/ifgVgl2jY95QEFLJ0AYCNQEjs81i6LcEXvmjnjAvPXp k0wZm8AZ+ejwc6ODsG+AfRou18qd3jV8qg57cgEKwLu59cTlC7lKQtCheSq7VdOLUbCB db0hkRVEgoy825/2AoWHxQpT40GNXgArcfIurSxGUN1B3NvSpXQyn/BC5zzzvES9qTQ0 UVTboT8OzEOZO54tzRpWp6PqL2Yk8Jy1CBHAr35YXyVk6cHlDcc7G7SZm1fiuyfvq0dv Avdw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gn19-20020a1709070d1300b0087777bb4127si2627391ejc.172.2023.01.26.10.31.23; Thu, 26 Jan 2023 10:32:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232124AbjAZS0v (ORCPT <rfc822;lekhanya01809@gmail.com> + 99 others); Thu, 26 Jan 2023 13:26:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232039AbjAZS0m (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 26 Jan 2023 13:26:42 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2E73168103 for <linux-kernel@vger.kernel.org>; Thu, 26 Jan 2023 10:26:37 -0800 (PST) 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 BEC2F14BF; Thu, 26 Jan 2023 10:27:18 -0800 (PST) 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 C45D63F71E; Thu, 26 Jan 2023 10:26:35 -0800 (PST) From: Robin Murphy <robin.murphy@arm.com> To: joro@8bytes.org, will@kernel.org Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org, hch@lst.de, jgg@nvidia.com, baolu.lu@linux.intel.com Subject: [PATCH v2 6/8] iommu/arm-smmu: Don't register fwnode for legacy binding Date: Thu, 26 Jan 2023 18:26:21 +0000 Message-Id: <93678b819d70079797734d9a8b0ebdc5beca43d2.1674753627.git.robin.murphy@arm.com> X-Mailer: git-send-email 2.36.1.dirty In-Reply-To: <cover.1674753627.git.robin.murphy@arm.com> References: <cover.1674753627.git.robin.murphy@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756110971016095462?= X-GMAIL-MSGID: =?utf-8?q?1756110971016095462?= |
Series |
iommu: The early demise of bus ops
|
|
Commit Message
Robin Murphy
Jan. 26, 2023, 6:26 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.
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
---
v2: No change
drivers/iommu/arm/arm-smmu/arm-smmu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Comments
On Thu, Jan 26, 2023 at 06:26:21PM +0000, 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. > > Signed-off-by: Robin Murphy <robin.murphy@arm.com> > --- > > v2: No change Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Jason
diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c index 719fbca1fe52..607f06af01b6 100644 --- a/drivers/iommu/arm/arm-smmu/arm-smmu.c +++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c @@ -2156,7 +2156,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);