Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4713953rdb; Fri, 15 Sep 2023 10:01:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGG7Qrsrs5OXgKNphyogaOM8ps3p/+Q/cZYPPWdKgVnhmjZeA7mlmECe9HxIgtv4a/52kxh X-Received: by 2002:a17:902:e5d2:b0:1be:ffaf:d72a with SMTP id u18-20020a170902e5d200b001beffafd72amr2535199plf.60.1694797262621; Fri, 15 Sep 2023 10:01:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694797262; cv=none; d=google.com; s=arc-20160816; b=bCAWz9OjKjOcjlEljPCRERHJ39+v/T1kGltAk8fNR7P5A5FuXrpF9IXNmYfhhOQn+B 8w8zvG8OavD7CBEHR8mjJAOp97lbjO1UviESxEVRmJ60GtcONQV4PASelaUVgIn82h9j ahZZH/+GAhvtpN5EdkVCwNk1AWRqIvJaOrnmaDgR6ZrBZqThvXtVQgZCrxK5P9rpJ5uq LWLyBn/9ZmklI6VJjWf99VNaGCp0LBMhL1kE+opxDwDLAfa7XiQgb9MirsrP4ySU9fmL wpTdYFpPzaJN8CDIODNa6X9sBUVnb/Ip0Gj/fXgRNUW5V3RSbuoAsWSNcpMdXBxlYwVo siYA== 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=3SO4sBNpOFNxfB4XNpCUWqe4lDXSOQ4O5f1XEPxUZRQ=; b=h5scbYNz361327Ur4wng4lX7FLImwD+fwIJBgQoZcNhLdqxeK8s/lfQgahlUdPw+Oz 3Gh0LPL8+UQpeVXelcGfNTe1cK4D90Eol3MOUS7+6QOUJRegfbzmTqeojnAH+DpmHRAd b7tLcDdUefAx104+DpWzlh5c/DKapYtquRpbCi9fPqFSpNEqTJMx20wFRi+FAWuNAb1e kPOLCsmLeOhZY+mxPvNIyUd7Ept6zaVlydmcQHMWz4EtHpWEaDYMSUdYz7hULx3zWHSc g8OKtvR1SHZmlWFkpC/ycSmb2/aEQCABcPWSbtdKj3piiU7qqoGSjGvwpEyfc5Zr/bT/ AMHA== 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 Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id ik28-20020a170902ab1c00b001c320085a71si3634068plb.639.2023.09.15.10.01.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 10:01:02 -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 5065C83BBD93; Fri, 15 Sep 2023 09:59:13 -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 S235244AbjIOQ6q (ORCPT + 99 others); Fri, 15 Sep 2023 12:58:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234696AbjIOQ6g (ORCPT ); Fri, 15 Sep 2023 12:58:36 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 26757211E for ; Fri, 15 Sep 2023 09:58:32 -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 2A72CC15; Fri, 15 Sep 2023 09:59:09 -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 C535E3F5A1; Fri, 15 Sep 2023 09:58:30 -0700 (PDT) From: Robin Murphy To: joro@8bytes.org, will@kernel.org Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, jgg@nvidia.com, baolu.lu@linux.intel.com Subject: [PATCH v3 5/7] iommu/arm-smmu: Don't register fwnode for legacy binding Date: Fri, 15 Sep 2023 17:58:09 +0100 Message-Id: <59a39f152a344cdfd26ca9f802562fc14a449d38.1694693889.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=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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: 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]); Fri, 15 Sep 2023 09:59:13 -0700 (PDT) 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 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