From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 29063C4332F for ; Fri, 11 Nov 2022 14:39:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VXGB/1g+QsNNll64XHEHezpUuhRp6Ha5JP0grpnkeUo=; b=jNY0LOUoE5V+rR 7n3j8pZMk9jn/zpoqxupCDJdnRbHpVsFkLUd7ao2IaBMRWdcFCmEpLieSDNDlyiU2WEJrSi0sFuJj dXQrf7dz1RJiDiV1t5vmv6K/lQcWIgRh0qFxzgvOihxaNxFurLyxcmcvvwHaJpAHYYmxv/LfYMPfm Zmso8ZZrINT/3ZbcClWxA6dXbHalCqAX5Bztv8eDaBtRy9pGEKRu9a9EmEhAd0+hir3xr9+AWMgR5 q8mi0vQPrN28eAExbu4TIa32+QQ/VW4qmHdSxkdTnL6HRlKLtRmsn8+2zyNAoIEba7iafdBJ4UZ8w QU64mnvMAa+7KhwLAiSw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1otVAb-00GGMH-A1; Fri, 11 Nov 2022 14:38:13 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1otVAY-00GGHZ-1B for linux-arm-kernel@lists.infradead.org; Fri, 11 Nov 2022 14:38:11 +0000 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 DEE111FB; Fri, 11 Nov 2022 06:38:09 -0800 (PST) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 950643F73D; Fri, 11 Nov 2022 06:38:02 -0800 (PST) Date: Fri, 11 Nov 2022 14:38:00 +0000 From: Sudeep Holla To: Sumit Garg Cc: linux-arm-kernel@lists.infradead.org, cristian.marussi@arm.com, Ludvig.Parsson@axis.com, jens.wiklander@linaro.org, etienne.carriere@linaro.org, vincent.guittot@linaro.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] firmware: arm_scmi: Resolve dependency with TEE subsystem Message-ID: <20221111143800.k7xje6g23ujefnye@bogus> References: <20221111095313.2010815-1-sumit.garg@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221111095313.2010815-1-sumit.garg@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221111_063810_157508_64B4028B X-CRM114-Status: GOOD ( 16.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Nov 11, 2022 at 03:23:13PM +0530, Sumit Garg wrote: > The OP-TEE SCMI transport channel is dependent on TEE subsystem to be > initialized first. But currently the Arm SCMI subsystem and TEE > subsystem are invoked on the same initcall level as subsystem_init(). > = > It is observed that the SCMI subsystem initcall is invoked prior to TEE > subsystem initcall. This leads to unwanted error messages regarding TEE > bus is not present yet. Although, -EPROBE_DEFER tries to workaround that > problem. > = > Lets try to resolve inter subsystem dependency problem via shifting Arm > SCMI subsystem to subsystem_init_sync() initcall level. > I would avoid doing that. We already have some implicit dependency with subsys_initcall because this driver creates/registers bus and need to be done early. Now in order to solve the dependency between SCMI and TEE, both of which creates/registers bus and are at same subsys_initcall, we are relying on subsys_initcall_sync. Me and Ludvig discussed this in private and I suggested him to do something like below patch snippet. He mentioned he did post a patch on the list but I couldn't find it. For this the scmi node must be child node of OPTEE as it is providing the transport. @Ludvig, ? Regards, Sudeep -- diff --git i/drivers/tee/optee/smc_abi.c w/drivers/tee/optee/smc_abi.c index a1c1fa1a9c28..839feca0def4 100644 --- i/drivers/tee/optee/smc_abi.c +++ w/drivers/tee/optee/smc_abi.c @@ -1534,7 +1534,9 @@ static int optee_probe(struct platform_device *pdev) =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 goto err_disable_shm_cache; =A0=A0=A0=A0=A0=A0=A0 pr_info("initialized driver\n"); -=A0=A0=A0=A0=A0=A0 return 0; + +=A0=A0=A0=A0=A0=A0 /* Populate any dependent child node(if any) */ +=A0=A0=A0=A0=A0=A0 return devm_of_platform_populate(&pdev->dev); =A0err_disable_shm_cache: =A0=A0=A0=A0=A0=A0=A0 if (!optee->rpc_param_count) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel