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 81CD0C4332F for ; Fri, 11 Nov 2022 15:14:44 +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=+fZBispMFbEh9E8Yf0mHWsU8adP+F6Y6fYP20faEl0I=; b=W+zc+/5g+KvdwQ CFy2llq9BAs/J5d4rnjU2VMd0v1A1aJzl7/8vF0dSTMpIgCuzQ0bkVJbses67kVEemC/MCcsGm0Ig mD8GfUrcLqllRFY4BLMkQpx3S/C1ZpX8+cGcN5W1zWsebBBVl2bTEPrLJEPid7/4l+hcXiBntIp+w 3Knk9o2C7+/nWBo7pLQ5CzYjtyCti09X7tjDVK3cv1OFYxJIndHpZE3PyKX3u/j1jWswVo0rnWoHu 1Up6FQKHGDYzrpfx3YUGHOn+twXiLj588dGBTxsuT6X87UHl5zpVYLblysZ+81cSLW/0NDuzJa2VT IA7fNdUUjQPEbrHvmLqg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1otViw-00GV5D-GB; Fri, 11 Nov 2022 15:13:42 +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 1otVis-00GV0w-Hb for linux-arm-kernel@lists.infradead.org; Fri, 11 Nov 2022 15:13:40 +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 8E6121FB; Fri, 11 Nov 2022 07:13:42 -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 29A273F73D; Fri, 11 Nov 2022 07:13:35 -0800 (PST) Date: Fri, 11 Nov 2022 15:13:32 +0000 From: Sudeep Holla To: Ludvig =?utf-8?Q?P=C3=A4rsson?= Cc: "sumit.garg@linaro.org" , "linux-arm-kernel@lists.infradead.org" , Sudeep Holla , "jens.wiklander@linaro.org" , "vincent.guittot@linaro.org" , "etienne.carriere@linaro.org" , "cristian.marussi@arm.com" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] firmware: arm_scmi: Resolve dependency with TEE subsystem Message-ID: <20221111151332.umzh6hncj43gqzo7@bogus> References: <20221111095313.2010815-1-sumit.garg@linaro.org> <20221111143800.k7xje6g23ujefnye@bogus> <7a32a3694ffd6790e4e2a7c5896931cf8f1a7243.camel@axis.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <7a32a3694ffd6790e4e2a7c5896931cf8f1a7243.camel@axis.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221111_071338_699969_24189241 X-CRM114-Status: GOOD ( 30.67 ) 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:00:29PM +0000, Ludvig P=E4rsson wrote: > On Fri, 2022-11-11 at 14:38 +0000, Sudeep Holla wrote: > > 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_cach= e; > > = > > =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) > > = > I have answered something similar in my submit [1]. Maybe I should have > CCed you, or atleast sent you this link when I told you I made the > submission. > = > [1] https://lkml.org/lkml/2022/11/9/803 > Thanks for the reference. -- = Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel