From: Sudeep Holla <sudeep.holla@arm.com>
To: Mark Brown <broonie@kernel.org>
Cc: Jassi Brar <jassisinghbrar@gmail.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-arm-kernel@lists.infradead.org,
Arnd Bergmann <arnd@arndb.de>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Cristian Marussi <cristian.marussi@arm.com>,
Sudeep Holla <sudeep.holla@arm.com>
Subject: Re: [PATCH 0/6] mailbox: arm_mhu: add support to use in doorbell mode
Date: Tue, 4 Jun 2019 10:44:24 +0100 [thread overview]
Message-ID: <20190604093827.GA31069@e107533-lin.cambridge.arm.com> (raw)
In-Reply-To: <20190603193946.GC2456@sirena.org.uk>
On Mon, Jun 03, 2019 at 08:39:46PM +0100, Mark Brown wrote:
> On Fri, May 31, 2019 at 05:53:26PM +0100, Sudeep Holla wrote:
> > On Fri, May 31, 2019 at 11:21:08AM -0500, Jassi Brar wrote:
> > > On Fri, May 31, 2019 at 9:33 AM Sudeep Holla <sudeep.holla@arm.com> wrote:
>
> > > > This is my another attempt to extend mailbox framework to support
> > > > doorbell mode mailbox hardware. It also adds doorbell support to ARM
> > > > MHU driver.
>
> > > Nothing has really changed since the last time we discussed many months ago.
> > > MHU remains same, and so are my points.
>
> > Yes, I understand your concern.
>
> > But as mentioned in the cover letter I did try the suggestions and have
> > detailed reasoning why that's still an issue. In short I ended up
> > re-inventing mailbox framework with all the queuing and similar APIs
> > for this. Worse, we can't even add an extra node for that in DT to
> > describe that. It can't be simple shim as we need to allow multiple
> > users to access one physical channel at a time. We have use case
> > where we can this for CPU DVFS fast switching in scheduler context.
>
> Forgive me if I'm missing something here (this is partly based on
> conversations from months ago so I may be misremembering things) but is
> the issue here specifically the doorbell mode or is it the need to have
> partly software defined mailboxes implemented using this hardware?
I can say it's partially both.
1. The hardware is designed keeping in mind multiple transport protocols:
doorbell mode, single word and multiple work(only in newer versions)
Using that hardware capability provides access to multiple channels
to the software.
2. I can also view this as software defined mailboxes if we go by
definition that each channel should have associated dedicated interrupt
as Jassi mentions.
The main idea is that each bit in these 32-bit registers can be written
atomically without the need of read-modify-write enabling software to
implement multiple channels in lock-less way.
> My understanding is that the hardware is more a component that's intended
> to allow potentially multiple more complex mailboxes to be tied to a
> single hardware block than a complete mailbox in and of itself.
Correct.
> It feels like the issues with sharing access to the hardware and with the
> API for talking to doorbell hardware are getting tied together and
> confusing things. But like I say I might be missing something here.
As I tried to simply in my cover letter, I will try to explain in simpler
terms.
1. This version of hardware has 3 blocks(one for secure and 2 non-secure)
Each block has 3 sets of 32-bit registers(SET, CLEAR and STATUS)
SET and CLEAR are write only and STATUS is read-only.
Each block has a dedicated interrupt line.
2. The hardware was designed to cater 2 transport protocols. A single
word transfer(non-zero) or each bit in doorbell mode.
3. The next version extends with each block having larger than 32-bit
window(up to 124 words) allowing it to used it for multiple
word as transport protocol. Mainly for some IoT usecase.
So what I am trying to convey here is MHU controller hardware can be
used choosing one of the different transport protocols available and
that's platform choice based on the use-case.
The driver in the kernel should identify the same from the firmware/DT
and configure it appropriately.
It may get inefficient and sometime impossible to address all use-case
if we stick to one transport protocol in the driver and try to build
an abstraction on top to use in different transport mode.
Hope this clarify things little bit more.
--
Regards,
Sudeep
next prev parent reply other threads:[~2019-06-04 9:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-31 14:33 Sudeep Holla
2019-05-31 14:33 ` [PATCH 1/6] mailbox: add support for doorbell/signal mode controllers Sudeep Holla
2019-06-03 21:51 ` Jassi Brar
2019-06-04 9:01 ` Sudeep Holla
2019-05-31 14:33 ` [PATCH 2/6] mailbox: arm_mhu: reorder header inclusion and drop unneeded ones Sudeep Holla
2019-05-31 14:33 ` [PATCH 3/6] dt-bindings: mailbox: add bindings to support ARM MHU doorbells Sudeep Holla
2019-05-31 14:33 ` [PATCH 4/6] mailbox: arm_mhu: migrate to threaded irq handler Sudeep Holla
2019-05-31 14:33 ` [PATCH 5/6] mailbox: arm_mhu: re-factor data structure to add doorbell support Sudeep Holla
2019-05-31 14:33 ` [PATCH 6/6] mailbox: arm_mhu: add full support for the doorbells Sudeep Holla
2019-05-31 16:21 ` [PATCH 0/6] mailbox: arm_mhu: add support to use in doorbell mode Jassi Brar
2019-05-31 16:53 ` Sudeep Holla
2019-06-03 19:39 ` Mark Brown
2019-06-04 9:44 ` Sudeep Holla [this message]
2019-06-05 19:46 ` Mark Brown
2019-06-06 0:51 ` Jassi Brar
2019-06-06 12:51 ` Sudeep Holla
2019-06-06 15:20 ` Jassi Brar
2019-06-06 15:40 ` Sudeep Holla
2019-06-13 15:08 ` 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=20190604093827.GA31069@e107533-lin.cambridge.arm.com \
--to=sudeep.holla@arm.com \
--cc=arnd@arndb.de \
--cc=bjorn.andersson@linaro.org \
--cc=broonie@kernel.org \
--cc=cristian.marussi@arm.com \
--cc=jassisinghbrar@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.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
all inboxes | Powered by JetHome®