Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp579931rdf; Tue, 21 Nov 2023 10:12:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IETdL1zzRL8wPn7g/e8FN7udoEZCYjN1U9xxizHrodZSrBUMQS7Z5N/CEjmFMFn8ALBF0GT X-Received: by 2002:a05:6a20:549e:b0:187:b735:81a9 with SMTP id i30-20020a056a20549e00b00187b73581a9mr11272537pzk.60.1700590335383; Tue, 21 Nov 2023 10:12:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700590335; cv=none; d=google.com; s=arc-20160816; b=tRwcO20WPOEslXOTYACQ8K1Lrge3Lad6Yj7KHHC5lmFQ55VnBvyDw1QkRVycTxXLxB 6c8QsdEM1kP4/HOCgk2OQjeuQdzWc5TroT24CI6lqLfGvm2Yfh9At+b9i7DzFIZ+rlmR FGYKmaBTPLp8X6pY5Q8Jna9R3KIFe5VsGijmZopLsWidNMn4k8iljR63iJdS6uIbhV5O Wht6bKAu9evHIGtlejZE0npCU92EuobjgF9tyIEEFXL1ztBqXCu3JN3tZ70NrMzbxOuJ 8k3Hq114aIzEsdjoGy171DBdo1AsWNPoMJ2h+LEAkxKWDSYnVmzHfiMDnpnoMVNv8K7y QTtQ== 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=cuY0cDNQohkQnvzuSvyK9mL2s3M/5a5RJFhEMl4Elfg=; fh=/LWf6GZq+5MWEfaJ8k2uZ3r5PX06byd5VRVQaY04470=; b=IVX2nlqp0R9cUzOfH5KOtU92DoPrm0lFhH8MTceirOx4sg4/K2bQVxIhXHATyyQuIT HXzN3DL3d73eL4IQOoLj4yQha5nnBcg+eEiWck/BpYbSBn3aXAhr4sOthreoOR2Uc0Ay o24QjG4Qc71OVna7yWyRNQk0bYgShZpxJGmbhQMuSGpmDY9AGnNfVToeuZjEoPUzgbS4 ApO1qydkA+egj5NF4YXY/cMaLfXRRv0IKQpRkttz1JiwBwWYCdppb5ZpHcw3CpkbTu1o b40Kf/zNA4BAL/Op2qn0LVySt+ukHChTpRWeSodnEbBGr2or+snX3UZ4Bilv+EqySrle TcRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id h20-20020a63c014000000b005c1e7583b8csi11027195pgg.96.2023.11.21.10.12.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 10:12:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 13E0C8106791; Tue, 21 Nov 2023 10:06:09 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234703AbjKUSFp (ORCPT + 99 others); Tue, 21 Nov 2023 13:05:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234652AbjKUSFG (ORCPT ); Tue, 21 Nov 2023 13:05:06 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BD1961991 for ; Tue, 21 Nov 2023 10:04:39 -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 863EB1BA8; Tue, 21 Nov 2023 10:05:07 -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 B0FFC3F6C4; Tue, 21 Nov 2023 10:04:19 -0800 (PST) From: Robin Murphy 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, jsnitsel@redhat.com Subject: [PATCH v6 5/7] iommu/arm-smmu: Don't register fwnode for legacy binding Date: Tue, 21 Nov 2023 18:04:01 +0000 Message-Id: <18b0f812a42a74dd6924aea24e68ab409d6e1b52.1700589539.git.robin.murphy@arm.com> X-Mailer: git-send-email 2.39.2.101.g768bb238c484.dirty In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 21 Nov 2023 10:06:09 -0800 (PST) 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. Acked-by: Will Deacon Reviewed-by: Jason Gunthorpe Reviewed-by: Jerry Snitselaar Signed-off-by: Robin Murphy --- 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