Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1350577rdb; Mon, 2 Oct 2023 07:06:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG22J4gGTIv9EJqIIi0ojSUepbQc44ukdH/wA6hlQ6jKx7cvOcbgTpcinSoc/UxjxKdhOqM X-Received: by 2002:a05:6a20:5511:b0:162:650c:76b8 with SMTP id ko17-20020a056a20551100b00162650c76b8mr2726602pzb.45.1696255585685; Mon, 02 Oct 2023 07:06:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696255585; cv=none; d=google.com; s=arc-20160816; b=kO2JtDINn8TteBvnkcb6Vrz0xgCM8sQKuS9FaXhK6ZWR9FOVWvJft6nqv4Wj7qAkv1 kEKc1XFCmKcDKyxgdCuD6Dac/XUmVb987rS6ONXZjhCTujdif4IsDYgMP/GCSwG1eqd6 3F2E0uKSiM4fDUoEPdvyoyDtYji0MtM7pKAjEEv3zAIASNrwhHoApckfgwqaKWt+P+zg RpWisrEE3hjh6FC3Eph4j4dNQ4/ceOBjdU1DLx+1w8sHnuTSOUqY1ptL69QJARKs3u4H Iu3Pda0BhfwbGgeP4ymaLr7TwLI7cTvRe3ywlCx6yzCsV2R65gKpkKqqXqBibn59I60F z6Wg== 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=icVPJJCJoEUScyl20f+CdlO/G/f4tfKtyYU+lNJqJGQv+KTAfMmMJELNPP1VCSsBVE DDmBr1947DstXz7GiJYiZZPhm3570d7xMmbvB2vbVEz57wQ9dbckSfgdPEKkGlys/k+g julo48DsXyUVW/uIITDmnFl9dm21VNdtRrMZ6vHKhyqzhvawraf5l1Dructrfa0spjH7 580b15gMSBr9sDU44WOX1w5Sf09mA+6Cdyhq4qAkC68zDoG5oBWt/1s5S2Kplh69uf/s 3dOgJWic0ZJ4EXzvFdJCOwcKn3xTVTiSjs5dRNZlYxygzhiUzJl/zQs+r6Y5Z7bRLjf6 l9JQ== 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 a18-20020a63d412000000b00565dfb7d580si21468885pgh.534.2023.10.02.07.06.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 07:06:25 -0700 (PDT) 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 3EABE80CF532; Mon, 2 Oct 2023 06:49:47 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237575AbjJBNtj (ORCPT + 99 others); Mon, 2 Oct 2023 09:49:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237534AbjJBNte (ORCPT ); Mon, 2 Oct 2023 09:49:34 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B9822B8 for ; Mon, 2 Oct 2023 06:49:27 -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 F0729DA7; Mon, 2 Oct 2023 06:50:05 -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 9DBDF3F762; Mon, 2 Oct 2023 06:49:26 -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 v4 5/7] iommu/arm-smmu: Don't register fwnode for legacy binding Date: Mon, 2 Oct 2023 14:49:13 +0100 Message-Id: <5ae4c8ce4e83ee25a1ccfb54a1403c9371b52eca.1696253096.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 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]); Mon, 02 Oct 2023 06:49:47 -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