From: Rob Herring <robherring2@gmail.com>
To: Courtney Cavin <courtney.cavin@sonymobile.com>
Cc: Josh Cartwright <joshc@codeaurora.org>,
Arnd Bergmann <arnd@arndb.de>, "s-anna@ti.com" <s-anna@ti.com>,
Rob Herring <rob.herring@calxeda.com>,
"Wysocki, Rafael J" <rafael.j.wysocki@intel.com>,
Mark Langsdorf <mark.langsdorf@calxeda.com>,
Tony Lindgren <tony@atomide.com>,
"omar.ramirez@copitl.com" <omar.ramirez@copitl.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>, Rob Landley <rob@landley.net>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC 1/6] mailbox: add core framework
Date: Mon, 10 Feb 2014 14:45:07 -0600 [thread overview]
Message-ID: <CAL_JsqK0YoVu0BfKSUfBQGoriCa4z-teXUQe6RPpjM2KKpeMAw@mail.gmail.com> (raw)
In-Reply-To: <20140210195914.GU1706@sonymobile.com>
On Mon, Feb 10, 2014 at 1:59 PM, Courtney Cavin
<courtney.cavin@sonymobile.com> wrote:
> On Mon, Feb 10, 2014 at 08:09:34PM +0100, Josh Cartwright wrote:
>> On Mon, Feb 10, 2014 at 11:52:05AM -0600, Rob Herring wrote:
>> > On Mon, Feb 10, 2014 at 8:11 AM, Arnd Bergmann <arnd@arndb.de> wrote:
>> > > On Friday 07 February 2014 16:50:14 Courtney Cavin wrote:
>> [..]
>> > >> +int mbox_channel_notify(struct mbox_channel *chan,
>> > >> + const void *data, unsigned int len)
>> > >> +{
>> > >> + return atomic_notifier_call_chain(&chan->notifier, len, (void *)data);
>> > >> +}
>> > >> +EXPORT_SYMBOL(mbox_channel_notify);
>> > >
>> > > What is the reason to use a notifier chain here? Isn't a simple
>> > > callback function pointer enough? I would expect that each mailbox
>> > > can have exactly one consumer, not multiple ones.
>> >
>> > It probably can be a callback, but there can be multiple consumers. It
>> > was only a notifier on the pl320 as there was no framework at the time
>> > and to avoid creating custom interfaces between drivers. On highbank
>> > for example, we can asynchronously receive the events for temperature
>> > change, power off, and reset. So either there needs to be an event
>> > demux somewhere or callbacks have to return whether they handled an
>> > event or not.
>>
>> I'm not familiar with highbank IPC, but with these requirements should
>> the mailbox core even bother with asynchronous notifier chain? It
>> sounds like a better fit might be for the mailbox core to implement a
>> proper adapter-specific irqdomain and used a chained irq handler to
>> demux (or have consumers request with IRQF_SHARED in the shared case).
>
> Although modeling this using irqdomains makes sense for the notification
> bit, and would probably suit most adapters, there's the issue of data
> being passed around which doesn't quite fit. "Ok, I have mail... where
> is it?" Did you have something in mind for that?
>
> Frankly, I don't see the notifier chain as being extraneous or
> over-complicated here core-wise or implementation-wise, and unless I
> understand Rob incorrectly, should suit the existing use-cases. Am I
> missing something?
Well, I think notifiers are not liked very much. I don't know that irq
handlers would be the right answer either as these are not h/w events
really and we may not want handlers to run in irq context. I would say
a callback similar to how the dma engine framework works is the right
answer. On the send side, you may want to have completion callbacks as
well.
Rob
next prev parent reply other threads:[~2014-02-10 20:45 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-08 0:50 [RFC 0/6] mailbox: add common framework and port drivers Courtney Cavin
[not found] ` <1391820619-25487-1-git-send-email-courtney.cavin-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>
2014-02-08 0:50 ` [RFC 1/6] mailbox: add core framework Courtney Cavin
2014-02-10 14:11 ` Arnd Bergmann
2014-02-10 17:17 ` Courtney Cavin
2014-02-10 17:52 ` Rob Herring
2014-02-10 19:09 ` Josh Cartwright
2014-02-10 19:59 ` Courtney Cavin
2014-02-10 20:45 ` Rob Herring [this message]
2014-02-11 0:23 ` Courtney Cavin
2014-02-11 8:35 ` Arnd Bergmann
2014-02-12 18:31 ` Courtney Cavin
2014-02-14 19:48 ` Arnd Bergmann
2014-02-14 20:16 ` Courtney Cavin
2014-02-08 0:50 ` [RFC 2/6] mailbox: document bindings Courtney Cavin
2014-02-08 0:50 ` [RFC 3/6] mailbox: pl320: migrate to mbox framework Courtney Cavin
2014-02-10 18:28 ` Rob Herring
2014-02-10 19:12 ` Courtney Cavin
2014-02-08 0:50 ` [RFC 4/6] mailbox: omap: remove omap-specific framework Courtney Cavin
2014-02-08 0:50 ` [RFC 5/6] mailbox: omap1: move to common mbox framework Courtney Cavin
2014-02-08 0:50 ` [RFC 6/6] mailbox: omap2+: " Courtney Cavin
2014-02-15 3:32 ` [RFC 0/6] mailbox: add common framework and port drivers Jassi Brar
2014-02-15 3:40 ` Greg Kroah-Hartman
2014-02-15 3:57 ` Jassi Brar
2014-02-15 4:11 ` Greg Kroah-Hartman
2014-02-15 4:14 ` Jassi Brar
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=CAL_JsqK0YoVu0BfKSUfBQGoriCa4z-teXUQe6RPpjM2KKpeMAw@mail.gmail.com \
--to=robherring2@gmail.com \
--cc=arnd@arndb.de \
--cc=courtney.cavin@sonymobile.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=gregkh@linuxfoundation.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=joshc@codeaurora.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.langsdorf@calxeda.com \
--cc=mark.rutland@arm.com \
--cc=omar.ramirez@copitl.com \
--cc=pawel.moll@arm.com \
--cc=rafael.j.wysocki@intel.com \
--cc=rob.herring@calxeda.com \
--cc=rob@landley.net \
--cc=s-anna@ti.com \
--cc=tony@atomide.com \
/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).