public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail•com>
To: Peng Fan <peng.fan@nxp•com>,
	"robh+dt@kernel•org" <robh+dt@kernel•org>,
	"mark.rutland@arm•com" <mark.rutland@arm•com>,
	"jassisinghbrar@gmail•com" <jassisinghbrar@gmail•com>,
	"sudeep.holla@arm•com" <sudeep.holla@arm•com>,
	"andre.przywara@arm•com" <andre.przywara@arm•com>
Cc: "devicetree@vger•kernel.org" <devicetree@vger•kernel.org>,
	"linux-kernel@vger•kernel.org" <linux-kernel@vger•kernel.org>,
	"linux-arm-kernel@lists•infradead.org"
	<linux-arm-kernel@lists•infradead.org>,
	dl-linux-imx <linux-imx@nxp•com>
Subject: Re: [PATCH V8 2/2] mailbox: introduce ARM SMC based mailbox
Date: Mon, 23 Sep 2019 19:48:27 -0700	[thread overview]
Message-ID: <1f01ea8e-8953-82ae-933c-721385dc0c13@gmail.com> (raw)
In-Reply-To: <1569287538-10854-3-git-send-email-peng.fan@nxp.com>

Hi Peng,

On 9/23/2019 6:14 PM, Peng Fan wrote:
> From: Peng Fan <peng.fan@nxp•com>
> 
> This mailbox driver implements a mailbox which signals transmitted data
> via an ARM smc (secure monitor call) instruction. The mailbox receiver
> is implemented in firmware and can synchronously return data when it
> returns execution to the non-secure world again.
> An asynchronous receive path is not implemented.
> This allows the usage of a mailbox to trigger firmware actions on SoCs
> which either don't have a separate management processor or on which such
> a core is not available. A user of this mailbox could be the SCP
> interface.
> 
> Modified from Andre Przywara's v2 patch
> https://lore.kernel.org/patchwork/patch/812999/
> 
> Cc: Andre Przywara <andre.przywara@arm•com>
> Signed-off-by: Peng Fan <peng.fan@nxp•com>
> ---

[snip]

> +typedef unsigned long (smc_mbox_fn)(unsigned int, unsigned long,
> +				    unsigned long, unsigned long,
> +				    unsigned long, unsigned long,
> +				    unsigned long);
> +static smc_mbox_fn *invoke_smc_mbox_fn;

Sorry for spotting this so late, the only thing that concerns me here
with this singleton is if we happen to have both an arm,smc-mbox and
arm,hvc-mbox configured in the system, this would not work. I do not
believe this could be a functional use case, but we should probably
guard against that or better yet, move that into the arm_smc_chan_data
private structure?
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-09-24  2:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-24  1:14 [PATCH V8 0/2] mailbox: arm: introduce smc triggered mailbox Peng Fan
2019-09-24  1:14 ` [PATCH V8 1/2] dt-bindings: mailbox: add binding doc for the ARM SMC/HVC mailbox Peng Fan
2019-09-24  3:00   ` Florian Fainelli
2019-09-24  1:14 ` [PATCH V8 2/2] mailbox: introduce ARM SMC based mailbox Peng Fan
2019-09-24  2:48   ` Florian Fainelli [this message]
2019-09-24  2:54     ` Peng Fan
2019-09-24  3:20   ` kbuild test robot

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=1f01ea8e-8953-82ae-933c-721385dc0c13@gmail.com \
    --to=f.fainelli@gmail$(echo .)com \
    --cc=andre.przywara@arm$(echo .)com \
    --cc=devicetree@vger$(echo .)kernel.org \
    --cc=jassisinghbrar@gmail$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-imx@nxp$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=mark.rutland@arm$(echo .)com \
    --cc=peng.fan@nxp$(echo .)com \
    --cc=robh+dt@kernel$(echo .)org \
    --cc=sudeep.holla@arm$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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