From: Sudeep Holla <sudeep.holla@arm.com>
To: Etienne Carriere <etienne.carriere@linaro.org>
Cc: devicetree@vger.kernel.org, peng.fan@nxp.com,
f.fainelli@gmail.com, viresh.kumar@linaro.org,
linux-kernel@vger.kernel.org, robh+dt@kernel.org,
linux-imx@nxp.com, Sudeep Holla <sudeep.holla@arm.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH V5 2/2] firmware: arm_scmi: add smc/hvc transport
Date: Wed, 15 Apr 2020 14:16:12 +0100 [thread overview]
Message-ID: <20200415131612.GC31928@bogus> (raw)
In-Reply-To: <5e96e916.1c69fb81.14365.050b@mx.google.com>
On Wed, Apr 15, 2020 at 12:58:58PM +0200, Etienne Carriere wrote:
> Hello Peng,
>
> I have 2 comments on this change. The main is about using
> arm_smccc_1_1_invoke(). Below some details and I added comments
> inside you patch. The second of on SMC return value, see my
> comment in your patch below.
>
> About arm_smccc_1_1_invoke(), this functon currently relies on PSCI
> driver to define a conduit method but SCMI agent driver does not
> mandate CONFIG_PSCI to be enable.
>
Yes this was discussed and it is done so deliberately. I have added the
build dependency when I merged the patch. There's no dependency on
CONFIG_PSCI.
> Could you add an optional "method" property for "arm,scmi-smc" for platforms
> willing to not rely on PSCI Linux driver? If no property "method" is
> defined in the FDT, invocation relies on arm_smccc_1_1_invoke().
>
Nope, we don't want mixture here. Why is the system not using PSCI/SMCCC ?
> "method" naming mimics what is done in the OP-TEE driver (drivers/tee/optee/).
> Here is a proposal for the documenting property "method" in
> Documentation/arm,scmi.txt:
>
> - method : "smc" or "hvc"
> Optional property defining the conduit method for to be used
> for invoking the SCMI server in secure world.
> "smc" states instruction SMC #0 is used whereas "hvc" states
> instruction HVC #0 is used.
>
>
It was rejected, you can try your luck with OPTEE :)
We will just use the system conduit here with SCMI for SMC/HVC transport.
Details in previous version of the patch.
[...]
> > +struct scmi_smc {
> > + struct scmi_chan_info *cinfo;
> > + struct scmi_shared_mem __iomem *shmem;
> > + u32 func_id;
> > +};
>
> Add here a field for the secure world invocation function handler:
>
> scmi_arm_smccc_invoke_fn *invoke_fn;
>
As stated not needed if we use arm_smccc_1_1_invoke()
[...]
>
> The SCMI server is likely not to return a errno compliant value.
>
> SMCCC specification states that unsupported function IDs should return signed
> extended -1. I suggest to change the return above with:
>
> return res.a0 == ~0 ? -EINVAL : 0;
>
I need to check that.
--
Regards,
Sudeep
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-04-15 13:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-08 13:24 [PATCH V5 0/2] firmware: arm_scmi: add smc/hvc transports support peng.fan
2020-03-08 13:24 ` [PATCH V5 1/2] dt-bindings: arm: arm,scmi: add smc/hvc transport peng.fan
2020-03-08 16:43 ` Florian Fainelli
2020-03-08 13:24 ` [PATCH V5 2/2] firmware: arm_scmi: " peng.fan
2020-03-20 8:27 ` [PATCH V5 0/2] firmware: arm_scmi: add smc/hvc transports support Peng Fan
2020-03-20 8:37 ` Sudeep Holla
2020-03-20 8:40 ` Peng Fan
2020-03-27 16:32 ` Sudeep Holla
2020-03-30 14:05 ` Sudeep Holla
2020-04-15 10:58 ` [PATCH V5 2/2] firmware: arm_scmi: add smc/hvc transport Etienne Carriere
2020-04-15 13:16 ` Sudeep Holla [this message]
2020-04-15 14:15 ` Etienne Carriere
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=20200415131612.GC31928@bogus \
--to=sudeep.holla@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=etienne.carriere@linaro.org \
--cc=f.fainelli@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peng.fan@nxp.com \
--cc=robh+dt@kernel.org \
--cc=viresh.kumar@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).