From: "Ludvig Pärsson" <Ludvig.Parsson@axis.com>
To: "sumit.garg@linaro.org" <sumit.garg@linaro.org>,
"sudeep.holla@arm.com" <sudeep.holla@arm.com>
Cc: "linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"jens.wiklander@linaro.org" <jens.wiklander@linaro.org>,
"vincent.guittot@linaro.org" <vincent.guittot@linaro.org>,
"Ludvig Pärsson" <Ludvig.Parsson@axis.com>,
"etienne.carriere@linaro.org" <etienne.carriere@linaro.org>,
"cristian.marussi@arm.com" <cristian.marussi@arm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] firmware: arm_scmi: Resolve dependency with TEE subsystem
Date: Fri, 11 Nov 2022 15:00:29 +0000 [thread overview]
Message-ID: <7a32a3694ffd6790e4e2a7c5896931cf8f1a7243.camel@axis.com> (raw)
In-Reply-To: <20221111143800.k7xje6g23ujefnye@bogus>
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)
> goto err_disable_shm_cache;
>
> pr_info("initialized driver\n");
> - return 0;
> +
> + /* Populate any dependent child node(if any) */
> + return devm_of_platform_populate(&pdev->dev);
>
> err_disable_shm_cache:
> 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
BR,
Ludvig
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: "Ludvig Pärsson" <Ludvig.Parsson@axis.com>
To: "sumit.garg@linaro.org" <sumit.garg@linaro.org>,
"sudeep.holla@arm.com" <sudeep.holla@arm.com>
Cc: "linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"jens.wiklander@linaro.org" <jens.wiklander@linaro.org>,
"vincent.guittot@linaro.org" <vincent.guittot@linaro.org>,
"Ludvig Pärsson" <Ludvig.Parsson@axis.com>,
"etienne.carriere@linaro.org" <etienne.carriere@linaro.org>,
"cristian.marussi@arm.com" <cristian.marussi@arm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] firmware: arm_scmi: Resolve dependency with TEE subsystem
Date: Fri, 11 Nov 2022 15:00:29 +0000 [thread overview]
Message-ID: <7a32a3694ffd6790e4e2a7c5896931cf8f1a7243.camel@axis.com> (raw)
In-Reply-To: <20221111143800.k7xje6g23ujefnye@bogus>
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)
> goto err_disable_shm_cache;
>
> pr_info("initialized driver\n");
> - return 0;
> +
> + /* Populate any dependent child node(if any) */
> + return devm_of_platform_populate(&pdev->dev);
>
> err_disable_shm_cache:
> 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
BR,
Ludvig
next prev parent reply other threads:[~2022-11-11 15:03 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-11 9:53 [PATCH] firmware: arm_scmi: Resolve dependency with TEE subsystem Sumit Garg
2022-11-11 9:53 ` Sumit Garg
2022-11-11 14:38 ` Sudeep Holla
2022-11-11 14:38 ` Sudeep Holla
2022-11-11 15:00 ` Ludvig Pärsson [this message]
2022-11-11 15:00 ` Ludvig Pärsson
2022-11-11 15:13 ` Sudeep Holla
2022-11-11 15:13 ` Sudeep Holla
2022-11-14 6:31 ` Sumit Garg
2022-11-14 6:31 ` Sumit Garg
2022-11-14 10:26 ` Sudeep Holla
2022-11-14 10:26 ` Sudeep Holla
2022-11-14 11:29 ` Etienne Carriere
2022-11-14 11:29 ` Etienne Carriere
2022-11-14 13:47 ` Ludvig Pärsson
2022-11-14 13:47 ` Ludvig Pärsson
2022-11-22 17:48 ` Cristian Marussi
2022-11-22 17:48 ` Cristian Marussi
2022-11-29 10:49 ` Ludvig Pärsson
2022-11-29 10:49 ` Ludvig Pärsson
2022-11-29 12:15 ` Cristian Marussi
2022-11-29 12:15 ` Cristian Marussi
2022-11-29 14:57 ` Etienne Carriere
2022-11-29 14:57 ` Etienne Carriere
2022-11-29 17:30 ` Cristian Marussi
2022-11-29 17:30 ` Cristian Marussi
2022-11-17 9:41 ` Sumit Garg
2022-11-17 9:41 ` Sumit Garg
2022-11-17 11:19 ` Sudeep Holla
2022-11-17 11:19 ` Sudeep Holla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7a32a3694ffd6790e4e2a7c5896931cf8f1a7243.camel@axis.com \
--to=ludvig.parsson@axis.com \
--cc=cristian.marussi@arm.com \
--cc=etienne.carriere@linaro.org \
--cc=jens.wiklander@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sudeep.holla@arm.com \
--cc=sumit.garg@linaro.org \
--cc=vincent.guittot@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.