Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1001882rdg; Wed, 11 Oct 2023 11:16:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHxILK950bbWaiRRuo/sq7hRAHe5r4bWTc544wQ7vYiNangfKXalAmljbAB5Ucg2peiIiOA X-Received: by 2002:a17:903:41c4:b0:1c6:294c:f89c with SMTP id u4-20020a17090341c400b001c6294cf89cmr25491747ple.63.1697048161338; Wed, 11 Oct 2023 11:16:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697048161; cv=none; d=google.com; s=arc-20160816; b=gYvlR05ObHOAg8xCbEx1ioOiHvrNMBPdfHmOgsVQCHOZpR/aqCo95Kb9ET/mg+ecl0 Paeis9BPp3nQN12dbf/ID3jrvHMefhFzrFwFlqqMZijMeYJxqkwNueR8hcxjmjKK+RdZ MkBlEs9sMt/Ku3MM+aKVg6wdGkmdawd7VLgHXQPLJj+ibPv6S1VIrxgNME/kuqdr8TqT 6hqFAAVuWXryrqhHIMXUaZtK4FW0+JPjDLt4S55SBjDpft1OJkYt7GRWSTWMo0hgn3ge 70wov3hdQ/lYiyYTlH3Jqxr3gxBqGjd9CaZPxnhGnc9dzV5q+C9f5djBnbG+vyPSbzap gmQw== 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.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id f4-20020a170902e98400b001c7342b46e4si259005plb.23.2023.10.11.11.16.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 11:16:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id B167A8174A6E; Wed, 11 Oct 2023 11:15:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234976AbjJKSPW (ORCPT + 99 others); Wed, 11 Oct 2023 14:15:22 -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 ); 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 ; 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 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: References: 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 agentk.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 (agentk.vger.email [0.0.0.0]); Wed, 11 Oct 2023 11:15:58 -0700 (PDT) X-Spam-Level: ** 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