From: Sudeep Holla <sudeep.holla-5wv7dgnIgG8@public.gmane.org>
To: Ashwin Chaugule
<ashwin.chaugule-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Jassi Brar
<jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Sudeep Holla <sudeep.holla-5wv7dgnIgG8@public.gmane.org>,
Devicetree List
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
lkml <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"ks.giri-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org"
<ks.giri-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
"ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org"
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
Mark Rutland <Mark.Rutland-5wv7dgnIgG8@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Pawel Moll <Pawel.Moll-5wv7dgnIgG8@public.gmane.org>,
Courtney Cavin
<courtney.cavin-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>,
Matt Porter <mporter-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Craig McGeachie <slapdau-/E1597aS9LT0CCvOHzKKcA@public.gmane.org>,
LeyFoon Tan <lftan.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Loic Pallardy <loic.pallardy-qxv4g6HH51o@public.gmane.org>,
"Anna, Suman" <s-anna-l0cyMroinI0@public.gmane.org>,
Bjorn Andersson <bjorn-UYDU3/A3LUY@public.gmane.org>,
Patch Tracking <patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
"mollie.wu-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
<mollie.wu-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Tetsuya Takinishi
<t.takinishi-+CUm20s59erQFUHtdCDX3A@public.gmane.org>,
"broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
<broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Kevin Hilman <khilman-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
"lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
<lee.jones@linaro>
Subject: Re: [PATCHv10 2/4] mailbox: Introduce framework for mailbox
Date: Mon, 22 Sep 2014 19:15:56 +0100 [thread overview]
Message-ID: <5420675C.6040805@arm.com> (raw)
In-Reply-To: <CAJ5Y-eZ5gNMQ2YRN4iS5QTU7qUrgxGdTHXhQZ_2ut4iBsEZHGg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 22/09/14 19:01, Ashwin Chaugule wrote:
> Hi Jassi,
>
> On 1 August 2014 08:31, Jassi Brar <jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
>> Introduce common framework for client/protocol drivers and
>> controller drivers of Inter-Processor-Communication (IPC).
>>
>> Client driver developers should have a look at
>> include/linux/mailbox_client.h to understand the part of
>> the API exposed to client drivers.
>> Similarly controller driver developers should have a look
>> at include/linux/mailbox_controller.h
>>
>> Signed-off-by: Jassi Brar <jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>> ---
>> MAINTAINERS | 8 +
>> drivers/mailbox/Makefile | 4 +
>> drivers/mailbox/mailbox.c | 466 +++++++++++++++++++++++++++++++++++++
>> include/linux/mailbox_client.h | 46 ++++
>> include/linux/mailbox_controller.h | 135 +++++++++++
>> 5 files changed, 659 insertions(+)
>> create mode 100644 drivers/mailbox/mailbox.c
>> create mode 100644 include/linux/mailbox_client.h
>> create mode 100644 include/linux/mailbox_controller.h
>>
>
> [..]
>
>> +
>> +static void poll_txdone(unsigned long data)
>> +{
>> + struct mbox_controller *mbox = (struct mbox_controller *)data;
>> + bool txdone, resched = false;
>> + int i;
>> +
>> + for (i = 0; i < mbox->num_chans; i++) {
>> + struct mbox_chan *chan = &mbox->chans[i];
>> +
>> + if (chan->active_req && chan->cl) {
>> + resched = true;
>> + txdone = chan->mbox->ops->last_tx_done(chan);
>> + if (txdone)
>> + tx_tick(chan, 0);
>> + }
>> + }
>> +
>> + if (resched)
>> + mod_timer(&mbox->poll, jiffies +
>> + msecs_to_jiffies(mbox->period));
>
> While preparing a different patch which uses the Mbox framework, I
> noticed that mbox->period might not be initialized anywhere. Also, how
> is mbox->txpoll_period to be used? It appears from the description of
> txpoll_period in mbox_controller.h that you'd want to use that value
> in the mod_timer above, or equate the two somewhere in the controller
> registration or eliminate one of the two. FWIW I also looked at your
> code in [1].
>
IIUC the controller needs to set the txpoll_period if it sets
txdone_poll, may be a sanity check for !0 would be good.
Regards,
Sudeep
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-09-22 18:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-01 12:29 [PATCHv10 0/4] Common Mailbox Framework Jassi Brar
[not found] ` <1406896194-4667-1-git-send-email-jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-08-01 12:30 ` [PATCHv10 1/4] mailbox: rename pl320-ipc specific mailbox.h Jassi Brar
2014-08-01 18:27 ` Mark Brown
2014-08-01 12:31 ` [PATCHv10 2/4] mailbox: Introduce framework for mailbox Jassi Brar
[not found] ` <1406896296-4863-1-git-send-email-jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-08-01 18:37 ` Mark Brown
2014-08-02 7:50 ` Jassi Brar
2014-09-22 18:01 ` Ashwin Chaugule
[not found] ` <CAJ5Y-eZ5gNMQ2YRN4iS5QTU7qUrgxGdTHXhQZ_2ut4iBsEZHGg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-09-22 18:15 ` Sudeep Holla [this message]
[not found] ` <5420675C.6040805-5wv7dgnIgG8@public.gmane.org>
2014-09-22 18:33 ` Sudeep Holla
[not found] ` <54206B7C.60501-5wv7dgnIgG8@public.gmane.org>
2014-09-24 16:14 ` Ashwin Chaugule
[not found] ` <CAJ5Y-ea7e1LCym49jGen-eXuw6tWOzTi3Rrd_K-4ZcZUwkv_jg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-09-26 0:57 ` Jassi Brar
[not found] ` <CAJe_ZhdxZwrBsvRt7X0KN2+vnQVRDAJdUGOyNgq2rynwmsur9A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-09-26 15:43 ` Ashwin Chaugule
2014-08-01 18:26 ` [PATCHv10 0/4] Common Mailbox Framework Mark Brown
[not found] ` <20140801182656.GJ30458-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-08-02 7:48 ` Jassi Brar
[not found] ` <CAJe_ZhcmEUDD3+xC2mBFnBm7uiMhibtHhBOMxVBhy700BTvYsA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-09-09 16:23 ` Suman Anna
[not found] ` <540F299A.6030906-l0cyMroinI0@public.gmane.org>
2014-09-09 16:57 ` Mark Brown
2014-08-01 12:32 ` [PATCHv10 3/4] doc: add documentation for mailbox framework Jassi Brar
2014-08-01 12:32 ` [PATCHv10 4/4] dt: mailbox: add generic bindings Jassi Brar
[not found] ` <1406896365-4971-1-git-send-email-jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-08-01 18:43 ` Mark Brown
2014-08-02 7:47 ` Jassi Brar
2014-08-04 14:40 ` Mark Brown
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=5420675C.6040805@arm.com \
--to=sudeep.holla-5wv7dgnigg8@public.gmane.org \
--cc=Mark.Rutland-5wv7dgnIgG8@public.gmane.org \
--cc=Pawel.Moll-5wv7dgnIgG8@public.gmane.org \
--cc=arnd-r2nGTMty4D4@public.gmane.org \
--cc=ashwin.chaugule-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=bjorn-UYDU3/A3LUY@public.gmane.org \
--cc=broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=courtney.cavin-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=khilman-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=ks.giri-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=lee.jones@linaro \
--cc=lftan.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=loic.pallardy-qxv4g6HH51o@public.gmane.org \
--cc=mollie.wu-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=mporter-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=s-anna-l0cyMroinI0@public.gmane.org \
--cc=slapdau-/E1597aS9LT0CCvOHzKKcA@public.gmane.org \
--cc=t.takinishi-+CUm20s59erQFUHtdCDX3A@public.gmane.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).